From bbf8041eceb2c03047d60280e5fa724982846e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 13 Jun 2018 14:14:10 +0200 Subject: [PATCH] Sync Weblate translations with Weblate template --- weblate/ar.po | 4218 +++++++++++++++++++++++++------------------ weblate/ca.po | 4218 +++++++++++++++++++++++++------------------ weblate/cs.po | 4222 +++++++++++++++++++++++++------------------ weblate/da.po | 4218 +++++++++++++++++++++++++------------------ weblate/de.po | 4226 +++++++++++++++++++++++++------------------ weblate/el.po | 4223 +++++++++++++++++++++++++------------------ weblate/es.po | 4295 ++++++++++++++++++++++++++------------------ weblate/es_MX.po | 4218 +++++++++++++++++++++++++------------------ weblate/fa.po | 4219 +++++++++++++++++++++++++------------------ weblate/fi.po | 4223 +++++++++++++++++++++++++------------------ weblate/fil.po | 4218 +++++++++++++++++++++++++------------------ weblate/fr.po | 4249 +++++++++++++++++++++++++------------------ weblate/he.po | 4222 +++++++++++++++++++++++++------------------ weblate/hu.po | 4218 +++++++++++++++++++++++++------------------ weblate/id.po | 4218 +++++++++++++++++++++++++------------------ weblate/it.po | 4219 +++++++++++++++++++++++++------------------ weblate/ja.po | 4221 +++++++++++++++++++++++++------------------ weblate/ko.po | 4228 +++++++++++++++++++++++++------------------ weblate/lt.po | 4218 +++++++++++++++++++++++++------------------ weblate/ms.po | 4218 +++++++++++++++++++++++++------------------ weblate/nb.po | 4218 +++++++++++++++++++++++++------------------ weblate/nl.po | 4218 +++++++++++++++++++++++++------------------ weblate/pl.po | 4258 +++++++++++++++++++++++++------------------ weblate/pt_BR.po | 4261 +++++++++++++++++++++++++------------------ weblate/pt_PT.po | 4223 +++++++++++++++++++++++++------------------ weblate/ru.po | 4244 +++++++++++++++++++++++++------------------ weblate/sl.po | 4222 +++++++++++++++++++++++++------------------ weblate/sr_Latn.po | 4218 +++++++++++++++++++++++++------------------ weblate/sv.po | 4218 +++++++++++++++++++++++++------------------ weblate/th.po | 4220 +++++++++++++++++++++++++------------------ weblate/tr.po | 4223 +++++++++++++++++++++++++------------------ weblate/uk.po | 4233 +++++++++++++++++++++++++------------------ weblate/vi.po | 4218 +++++++++++++++++++++++++------------------ weblate/zh_CN.po | 4226 +++++++++++++++++++++++++------------------ weblate/zh_TW.po | 4220 +++++++++++++++++++++++++------------------ 35 files changed, 88235 insertions(+), 59694 deletions(-) diff --git a/weblate/ar.po b/weblate/ar.po index 92c46e5343..99316f27e9 100644 --- a/weblate/ar.po +++ b/weblate/ar.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-05-27 17:34+0000\n" "Last-Translator: Rached Noureddine \n" "Language-Team: Arabic `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23333,30 +23335,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23364,121 +23366,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23486,13 +23488,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23500,44 +23502,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23545,14 +23547,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23561,44 +23563,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23607,27 +23610,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23635,162 +23639,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23798,158 +23804,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23984,7 +23990,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24017,7 +24023,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24054,18 +24060,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24113,7 +24120,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24224,7 +24231,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24682,7 +24689,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24723,9 +24730,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24764,37 +24771,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24803,19 +24812,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24823,26 +24832,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24850,7 +24859,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24859,7 +24868,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24868,20 +24877,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24890,66 +24899,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24959,7 +24968,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24967,23 +24976,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24993,28 +25002,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25023,21 +25032,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25045,380 +25054,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25426,149 +25442,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25576,114 +25596,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25695,519 +25731,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26215,28 +26255,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26246,81 +26286,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26329,155 +26369,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26489,9 +26536,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26514,7 +26561,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26578,8 +26625,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26588,8 +26635,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26602,7 +26649,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26633,7 +26680,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26641,7 +26688,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26673,8 +26720,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26699,7 +26746,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26710,13 +26757,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26725,16 +26772,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26747,17 +26796,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26766,15 +26814,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26798,7 +26846,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26806,20 +26854,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26833,10 +26882,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26857,8 +26906,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26874,7 +26923,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26922,7 +26971,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26964,10 +27013,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26982,7 +27031,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26990,7 +27039,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27018,8 +27067,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27028,7 +27077,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27044,8 +27093,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27090,20 +27139,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27112,7 +27161,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27122,17 +27171,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27141,8 +27190,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27167,42 +27217,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27275,15 +27327,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27291,8 +27343,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27337,12 +27388,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27393,51 +27444,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27447,23 +27500,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27475,15 +27528,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27526,7 +27579,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27548,48 +27601,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27648,11 +27701,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27661,8 +27714,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27676,16 +27729,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27695,26 +27749,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27727,7 +27781,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27742,209 +27798,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27952,79 +28015,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28032,127 +28095,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28161,74 +28224,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28237,290 +28303,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28528,184 +28595,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28713,37 +28786,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28827,7 +28900,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28890,8 +28963,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28914,7 +28987,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28924,118 +28997,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29043,51 +29116,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29096,19 +29170,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29117,80 +29190,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29199,42 +29278,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29244,21 +29323,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29266,7 +29345,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29275,7 +29354,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29284,412 +29363,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29697,7 +29781,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29705,301 +29789,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30007,26 +30104,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34605,6 +34702,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36794,7 +36892,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46806,6 +46904,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53160,126 +53667,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53289,11 +53712,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56009,6 +56813,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/ca.po b/weblate/ca.po index 01891e5650..e6f7ed3ea5 100644 --- a/weblate/ca.po +++ b/weblate/ca.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-09 04:35+0000\n" "Last-Translator: Roger Blanco Ribera \n" "Language-Team: Catalan `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23454,30 +23456,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23485,121 +23487,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23607,13 +23609,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23621,44 +23623,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23666,14 +23668,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23682,44 +23684,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23728,27 +23731,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23756,162 +23760,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23919,158 +23925,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24105,7 +24111,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24138,7 +24144,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24175,18 +24181,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24234,7 +24241,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24345,7 +24352,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24803,7 +24810,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24844,9 +24851,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24885,37 +24892,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24924,19 +24933,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24944,26 +24953,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24971,7 +24980,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24980,7 +24989,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24989,20 +24998,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -25011,66 +25020,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25080,7 +25089,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25088,23 +25097,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25114,28 +25123,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25144,21 +25153,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25166,380 +25175,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25547,149 +25563,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25697,114 +25717,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25816,519 +25852,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26336,28 +26376,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26367,81 +26407,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26450,155 +26490,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26610,9 +26657,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26635,7 +26682,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26699,8 +26746,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26709,8 +26756,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26723,7 +26770,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26754,7 +26801,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26762,7 +26809,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26794,8 +26841,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26820,7 +26867,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26831,13 +26878,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26846,16 +26893,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26868,17 +26917,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26887,15 +26935,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26919,7 +26967,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26927,20 +26975,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26954,10 +27003,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26978,8 +27027,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26995,7 +27044,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27043,7 +27092,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27085,10 +27134,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27103,7 +27152,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27111,7 +27160,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27139,8 +27188,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27149,7 +27198,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27165,8 +27214,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27211,20 +27260,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27233,7 +27282,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27243,17 +27292,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27262,8 +27311,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27288,42 +27338,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27396,15 +27448,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27412,8 +27464,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27458,12 +27509,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27514,51 +27565,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27568,23 +27621,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27596,15 +27649,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27647,7 +27700,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27669,48 +27722,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27769,11 +27822,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27782,8 +27835,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27797,16 +27850,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27816,26 +27870,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27848,7 +27902,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27863,209 +27919,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28073,79 +28136,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28153,127 +28216,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28282,74 +28345,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28358,290 +28424,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28649,184 +28716,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28834,37 +28907,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28948,7 +29021,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -29011,8 +29084,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -29035,7 +29108,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29045,118 +29118,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29164,51 +29237,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29217,19 +29291,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29238,80 +29311,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29320,42 +29399,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29365,21 +29444,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29387,7 +29466,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29396,7 +29475,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29405,412 +29484,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29818,7 +29902,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29826,301 +29910,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30128,26 +30225,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34726,6 +34823,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36915,7 +37013,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46927,6 +47025,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53281,126 +53788,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53410,11 +53833,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56131,6 +56935,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/cs.po b/weblate/cs.po index 7af33f2d9c..df2cf71426 100644 --- a/weblate/cs.po +++ b/weblate/cs.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-05-20 16:35+0000\n" "Last-Translator: Josef Kuchař \n" "Language-Team: Czech `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23300,30 +23302,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23331,121 +23333,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23453,13 +23455,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23467,44 +23469,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23512,14 +23514,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23528,44 +23530,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23574,27 +23577,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23602,162 +23606,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23765,158 +23771,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23951,7 +23957,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -23984,7 +23990,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24021,18 +24027,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24080,7 +24087,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24191,7 +24198,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24649,7 +24656,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24690,9 +24697,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24731,37 +24738,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24770,19 +24779,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24790,26 +24799,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24817,7 +24826,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24826,7 +24835,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24835,20 +24844,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24857,66 +24866,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24926,7 +24935,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24934,23 +24943,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24960,28 +24969,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -24990,21 +24999,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25012,380 +25021,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25393,149 +25409,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25543,114 +25563,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25662,519 +25698,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26182,28 +26222,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26213,81 +26253,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26296,155 +26336,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26456,9 +26503,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26481,7 +26528,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26545,8 +26592,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26555,8 +26602,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26569,7 +26616,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26600,7 +26647,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26608,7 +26655,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26640,8 +26687,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26666,7 +26713,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26677,13 +26724,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26692,16 +26739,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26714,17 +26763,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26733,15 +26781,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26765,7 +26813,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26773,20 +26821,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26800,10 +26849,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26824,8 +26873,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26841,7 +26890,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26889,7 +26938,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26931,10 +26980,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26949,7 +26998,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26957,7 +27006,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -26985,8 +27034,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -26995,7 +27044,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27011,8 +27060,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27057,20 +27106,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27079,7 +27128,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27089,17 +27138,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27108,8 +27157,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27134,42 +27184,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27242,15 +27294,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27258,8 +27310,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27304,12 +27355,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27360,51 +27411,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27414,23 +27467,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27442,15 +27495,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27493,7 +27546,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27515,48 +27568,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27615,11 +27668,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27628,8 +27681,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27643,16 +27696,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27662,26 +27716,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27694,7 +27748,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27709,209 +27765,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27919,79 +27982,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -27999,127 +28062,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28128,74 +28191,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28204,290 +28270,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28495,184 +28562,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28680,37 +28753,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28794,7 +28867,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28857,8 +28930,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28881,7 +28954,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28891,118 +28964,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29010,51 +29083,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29063,19 +29137,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29084,80 +29157,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29166,42 +29245,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29211,21 +29290,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29233,7 +29312,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29242,7 +29321,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29251,412 +29330,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29664,7 +29748,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29672,301 +29756,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -29974,26 +30071,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34572,6 +34669,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Animace" @@ -36761,7 +36859,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46773,6 +46871,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53129,126 +53636,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53258,11 +53681,396 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Cesta ke zdroji" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Animace" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Hodnota" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Konstanty" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -55974,6 +56782,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/da.po b/weblate/da.po index 280daf8537..9b2a1ff182 100644 --- a/weblate/da.po +++ b/weblate/da.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-04-29 15:59+0000\n" "Last-Translator: Christoffer Schindel \n" "Language-Team: Danish `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23433,30 +23435,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23464,121 +23466,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23586,13 +23588,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23600,44 +23602,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23645,14 +23647,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23661,44 +23663,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23707,27 +23710,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23735,162 +23739,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23898,158 +23904,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24084,7 +24090,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24117,7 +24123,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24154,18 +24160,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24213,7 +24220,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24324,7 +24331,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24782,7 +24789,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24823,9 +24830,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24864,37 +24871,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24903,19 +24912,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24923,26 +24932,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24950,7 +24959,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24959,7 +24968,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24968,20 +24977,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24990,66 +24999,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25059,7 +25068,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25067,23 +25076,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25093,28 +25102,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25123,21 +25132,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25145,380 +25154,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25526,149 +25542,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25676,114 +25696,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25795,519 +25831,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26315,28 +26355,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26346,81 +26386,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26429,155 +26469,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26589,9 +26636,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26614,7 +26661,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26678,8 +26725,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26688,8 +26735,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26702,7 +26749,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26733,7 +26780,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26741,7 +26788,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26773,8 +26820,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26799,7 +26846,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26810,13 +26857,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26825,16 +26872,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26847,17 +26896,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26866,15 +26914,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26898,7 +26946,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26906,20 +26954,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26933,10 +26982,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26957,8 +27006,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26974,7 +27023,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27022,7 +27071,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27064,10 +27113,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27082,7 +27131,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27090,7 +27139,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27118,8 +27167,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27128,7 +27177,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27144,8 +27193,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27190,20 +27239,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27212,7 +27261,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27222,17 +27271,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27241,8 +27290,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27267,42 +27317,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27375,15 +27427,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27391,8 +27443,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27437,12 +27488,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27493,51 +27544,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27547,23 +27600,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27575,15 +27628,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27626,7 +27679,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27648,48 +27701,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27748,11 +27801,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27761,8 +27814,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27776,16 +27829,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27795,26 +27849,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27827,7 +27881,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27842,209 +27898,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28052,79 +28115,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28132,127 +28195,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28261,74 +28324,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28337,290 +28403,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28628,184 +28695,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28813,37 +28886,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28927,7 +29000,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28990,8 +29063,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -29014,7 +29087,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29024,118 +29097,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29143,51 +29216,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29196,19 +29270,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29217,80 +29290,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29299,42 +29378,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29344,21 +29423,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29366,7 +29445,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29375,7 +29454,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29384,412 +29463,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29797,7 +29881,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29805,301 +29889,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30107,26 +30204,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34705,6 +34802,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36894,7 +36992,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46906,6 +47004,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53260,126 +53767,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53389,11 +53812,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56110,6 +56914,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/de.po b/weblate/de.po index 144fe52765..43960cfd4e 100644 --- a/weblate/de.po +++ b/weblate/de.po @@ -25,7 +25,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-06 07:06+0000\n" "Last-Translator: kdankert \n" "Language-Team: German `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23993,30 +23995,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -24024,122 +24026,122 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 #, fuzzy msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr ":ref:`Vector3 `" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -24147,13 +24149,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -24161,44 +24163,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -24206,14 +24208,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -24222,44 +24224,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -24268,27 +24271,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -24296,162 +24300,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -24459,158 +24465,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24645,7 +24651,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24678,7 +24684,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24715,18 +24721,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24774,7 +24781,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24885,7 +24892,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -25343,7 +25350,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -25384,9 +25391,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -25425,37 +25432,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -25464,19 +25473,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -25484,26 +25493,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -25511,7 +25520,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -25520,7 +25529,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -25529,20 +25538,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -25551,66 +25560,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25620,7 +25629,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25628,23 +25637,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25654,28 +25663,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25684,21 +25693,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25706,380 +25715,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -26087,149 +26103,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -26237,114 +26257,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -26356,519 +26392,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26876,28 +26916,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26907,81 +26947,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26990,155 +27030,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -27150,9 +27197,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -27175,7 +27222,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -27239,8 +27286,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -27249,8 +27296,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -27263,7 +27310,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -27294,7 +27341,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -27302,7 +27349,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -27334,8 +27381,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -27360,7 +27407,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -27371,13 +27418,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -27386,16 +27433,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -27408,17 +27457,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -27427,15 +27475,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -27459,7 +27507,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -27467,20 +27515,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -27494,10 +27543,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -27518,8 +27567,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -27535,7 +27584,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27583,7 +27632,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27625,10 +27674,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27643,7 +27692,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27651,7 +27700,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27679,8 +27728,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27689,7 +27738,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27705,8 +27754,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27751,20 +27800,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27773,7 +27822,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27783,17 +27832,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27802,8 +27851,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27828,42 +27878,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27936,15 +27988,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27952,8 +28004,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27998,12 +28049,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -28054,51 +28105,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -28108,23 +28161,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -28136,15 +28189,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -28187,7 +28240,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -28209,48 +28262,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -28309,11 +28362,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -28322,8 +28375,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -28337,16 +28390,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -28356,26 +28410,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -28388,7 +28442,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -28403,209 +28459,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28613,79 +28676,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28693,127 +28756,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28822,74 +28885,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28898,290 +28964,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -29189,184 +29256,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -29374,37 +29447,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -29488,7 +29561,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -29551,8 +29624,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -29575,7 +29648,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29585,118 +29658,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29704,13 +29777,13 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 #, fuzzy msgid "" "For more information on singleton/autoload scripts, see :ref:" @@ -29718,39 +29791,40 @@ msgid "" msgstr "" "Für mehr Informationen über Events, siehe :ref:`doc_inputevent` Tutorial." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29759,19 +29833,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29780,80 +29853,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29862,42 +29941,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29907,21 +29986,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29929,7 +30008,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29938,7 +30017,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29947,412 +30026,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -30360,7 +30444,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -30368,301 +30452,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30670,26 +30767,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -35268,6 +35365,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Animation" @@ -37457,7 +37555,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -47470,6 +47568,416 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +#, fuzzy +msgid "Creating a simple plugin" +msgstr "Erstellen eines C# Skripts" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53832,126 +54340,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53961,11 +54385,399 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Ressourcenpfad" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Animation" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +#, fuzzy +msgid "ArrayMesh" +msgstr "Arrays" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +#, fuzzy +msgid "arrays" +msgstr "Arrays" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Transformation" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Wert" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Konstanten" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56682,6 +57494,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/el.po b/weblate/el.po index ff38279a18..7d4a7a534f 100644 --- a/weblate/el.po +++ b/weblate/el.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-05-06 16:37+0000\n" "Last-Translator: George Tsiamasiotis \n" "Language-Team: Greek `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23562,30 +23564,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23593,121 +23595,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23715,13 +23717,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23729,44 +23731,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23774,14 +23776,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23790,44 +23792,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23836,27 +23839,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23864,162 +23868,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -24027,158 +24033,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24213,7 +24219,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24246,7 +24252,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24283,18 +24289,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24342,7 +24349,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24453,7 +24460,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24911,7 +24918,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24952,9 +24959,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24993,37 +25000,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -25032,19 +25041,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -25052,26 +25061,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -25079,7 +25088,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -25088,7 +25097,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -25097,20 +25106,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -25119,66 +25128,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25188,7 +25197,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25196,23 +25205,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25222,28 +25231,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25252,21 +25261,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25274,380 +25283,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25655,149 +25671,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25805,114 +25825,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25924,519 +25960,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26444,28 +26484,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26475,81 +26515,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26558,155 +26598,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26718,9 +26765,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26743,7 +26790,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26807,8 +26854,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26817,8 +26864,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26831,7 +26878,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26862,7 +26909,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26870,7 +26917,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26902,8 +26949,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26928,7 +26975,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26939,13 +26986,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26954,16 +27001,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26976,17 +27025,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26995,15 +27043,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -27027,7 +27075,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -27035,20 +27083,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -27062,10 +27111,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -27086,8 +27135,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -27103,7 +27152,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27151,7 +27200,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27193,10 +27242,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27211,7 +27260,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27219,7 +27268,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27247,8 +27296,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27257,7 +27306,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27273,8 +27322,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27319,20 +27368,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27341,7 +27390,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27351,17 +27400,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27370,8 +27419,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27396,42 +27446,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27504,15 +27556,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27520,8 +27572,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27566,12 +27617,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27622,51 +27673,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27676,23 +27729,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27704,15 +27757,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27755,7 +27808,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27777,48 +27830,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27877,11 +27930,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27890,8 +27943,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27905,16 +27958,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27924,26 +27978,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27956,7 +28010,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27971,209 +28027,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28181,79 +28244,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28261,127 +28324,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28390,74 +28453,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28466,290 +28532,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28757,184 +28824,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28942,37 +29015,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -29056,7 +29129,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -29119,8 +29192,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -29143,7 +29216,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29153,118 +29226,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29272,51 +29345,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29325,19 +29399,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29346,80 +29419,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29428,42 +29507,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29473,21 +29552,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29495,7 +29574,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29504,7 +29583,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29513,412 +29592,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29926,7 +30010,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29934,301 +30018,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30236,26 +30333,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34834,6 +34931,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Κίνηση" @@ -37023,7 +37121,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -47035,6 +47133,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53391,126 +53898,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53520,11 +53943,397 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Διαδρομή πόρου" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Κίνηση" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Μετασχηματισμός" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Τιμή" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Σταθερές" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56240,6 +57049,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/es.po b/weblate/es.po index 7f01957489..8097044d2e 100644 --- a/weblate/es.po +++ b/weblate/es.po @@ -35,7 +35,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-13 11:53+0000\n" "Last-Translator: AnyMan \n" "Language-Team: Spanish `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -29048,30 +29049,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -29079,121 +29080,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "Primero ponemos ``dir`` a un :ref:`Vector3 `." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -29201,13 +29202,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -29215,44 +29216,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -29260,14 +29261,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -29276,44 +29277,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -29322,27 +29324,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -29350,162 +29353,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -29513,158 +29518,161 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 +#, fuzzy msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" +"Primero obtenemos el singleton ``Globals`` y lo asignamos a una variable " +"local." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -29699,7 +29707,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -29732,7 +29740,8 @@ msgid "Lets go over what this script is doing:" msgstr "Repasemos lo que hace este script:" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +#, fuzzy +msgid "Lets start with this script's class variables:" msgstr "Empecemos con los variables globales de este script:" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -29775,18 +29784,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -29834,7 +29844,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -29945,7 +29955,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -30414,7 +30424,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -30455,9 +30465,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -30496,37 +30506,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -30535,19 +30547,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -30555,26 +30567,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -30582,7 +30594,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -30591,7 +30603,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -30600,20 +30612,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -30622,66 +30634,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -30691,7 +30703,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -30699,23 +30711,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -30725,28 +30737,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -30755,21 +30767,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -30777,380 +30789,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -31158,149 +31177,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -31308,114 +31331,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -31427,519 +31466,530 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +#, fuzzy +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" +"Añade un script al nodo ``Mob`` y luego añade las siguientes variables " +"miembro:" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#, fuzzy +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "Añade el código siguiente a ``AnimationPlayer_Manager.gd``:" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 +#, fuzzy msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" +"Añade un script al nodo ``Mob`` y luego añade las siguientes variables " +"miembro:" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -31947,28 +31997,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -31978,81 +32028,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -32067,155 +32117,162 @@ msgstr "" "expuestas para no tener que recordar el nombre(s) de cada efecto de sonido " "que queramos reproducir." -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -32227,9 +32284,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -32252,7 +32309,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -32316,8 +32373,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -32326,8 +32383,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -32340,7 +32397,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -32371,7 +32428,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -32379,7 +32436,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -32411,8 +32468,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -32437,7 +32494,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -32448,13 +32505,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -32463,16 +32520,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -32485,17 +32544,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -32504,16 +32562,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +#, fuzzy +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" +"Añade un script al nodo ``Mob`` y luego añade las siguientes variables " +"miembro:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 msgid "Let's go over what each of these new variables will be doing:" @@ -32536,7 +32597,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -32544,20 +32605,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -32571,10 +32633,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -32595,8 +32657,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -32612,7 +32674,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -32659,9 +32721,10 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 +#, fuzzy msgid "" -"Let's go over what this script is doing, starting with its global variables:" -msgstr "" +"Let's go over what this script is doing, starting with its class variables:" +msgstr "Repasemos lo que hace este script:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 msgid "" @@ -32702,10 +32765,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -32720,7 +32783,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -32728,7 +32791,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -32756,8 +32819,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -32766,7 +32829,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -32782,8 +32845,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -32828,21 +32891,24 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +#, fuzzy +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" +"Añade un script al nodo ``Mob`` y luego añade las siguientes variables " +"miembro:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 msgid "``MAX_HEALTH``: The maximum amount of health a player can have." @@ -32850,7 +32916,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -32860,17 +32926,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -32879,8 +32945,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -32905,42 +32972,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -33013,15 +33082,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -33029,9 +33098,9 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" -msgstr "" +#, fuzzy +msgid "Let's go over what this script does, starting with the class variables:" +msgstr "Repasemos lo que hace este script:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 msgid "" @@ -33075,12 +33144,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -33131,51 +33200,54 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +#, fuzzy +msgid "In this case, we want to respawn the target." msgstr "En este caso, queremos volver a generar nuestro objetivo." #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -33185,23 +33257,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -33213,15 +33285,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -33264,7 +33336,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -33286,48 +33358,48 @@ msgstr "Añadir granadas" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -33386,11 +33458,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -33398,10 +33470,13 @@ msgid "Now let's turn our attention to ``_ready``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 +#, fuzzy msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" +"Primero obtenemos el singleton ``Globals`` y lo asignamos a una variable " +"local." #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 msgid "" @@ -33414,16 +33489,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -33433,26 +33509,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -33465,7 +33541,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -33480,209 +33558,219 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 +#, fuzzy msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" +"``current_state``: Un variable para contener el nombre del estado de " +"animación en que estamos actualmente." -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -33690,79 +33778,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -33770,127 +33858,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -33899,74 +33987,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -33975,290 +34066,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -34266,184 +34358,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -34451,37 +34549,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -34565,7 +34663,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -34628,8 +34726,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -34657,7 +34755,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -34667,19 +34765,20 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 +#, fuzzy msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" "Si se pulsa uno de los botones de cambio de escena, primero llamamos " "``set_mouse_and_joypad_sensitivity`` por lo que nuestro singleton tiene los " @@ -34687,50 +34786,50 @@ msgstr "" "singleton que cambie los nodos usando su función ``load_new_scene``, pasando " "la ruta del archivo de la escena que queremos cambiar." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "No te preocupes por el singleton ¡Llegaremos pronto!" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" "Primero obtenemos el singleton ``Globals`` y lo asignamos a una variable " "local." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "Haciendo el singleton ``Globals``" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." @@ -34739,56 +34838,56 @@ msgstr "" "``Globals``. Crea un nuevo script en la pestaña ``Script`` y llámalo " "``Globals.gd``." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -34796,15 +34895,16 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 +#, fuzzy msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" "Esto hará de ``Globals.gd`` un script singleton/autoload, que nos permitirá " "acceder a él desde cualquier lugar en cualquier escena." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." @@ -34812,7 +34912,7 @@ msgstr "" "Para más información sobre scripts singleton/autoload, ve :ref:" "`doc_singletons_autoload`." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" @@ -34820,33 +34920,34 @@ msgstr "" "Ahora que ``Globals.gd`` es un script singleton/autoload ¡puedes probar el " "menú principal!" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -34855,19 +34956,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -34876,36 +34976,36 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" @@ -34913,45 +35013,55 @@ msgstr "" "Esto llamará a una nueva función en nuestra llamada singleton " "``set_debug_display`` ¡así que agreguemos eso a continuación!" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +#, fuzzy +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" +"Añade un script al nodo ``Mob`` y luego añade las siguientes variables " +"miembro:" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 +#, fuzzy msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." +msgstr "``globals``: Una variable para contener el singleton ``Globals.gd``." + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 +msgid "" +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -34965,42 +35075,42 @@ msgstr "" "puedes encontrarte con problemas de memoria si estás instanciando/generando " "muchos nodos y no los estás liberando." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -35016,21 +35126,21 @@ msgstr "" "como hijos del singleton/autoload permanecerán mientras el juego esté en " "marcha ¡sin ningún trabajo adicional por nuestra parte!" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -35038,7 +35148,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -35047,7 +35157,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -35056,416 +35166,423 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "``globals``: Una variable para contener el singleton ``Globals.gd``." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 +#, fuzzy msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" "Ahora obtenemos el singleton ``Globals.gd`` y lo asignamos a ``globals``. " "También establecemos nuestra posición global usando el origen de nuestra :" "ref:`Transform ` a la posición devuelta por ``globals." "get_respawn_position``." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." -msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +#, fuzzy +msgid "Now all of the weapons will reset when the player dies." +msgstr "Desvanecer la barra cuando el jugador muere" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -35473,7 +35590,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -35481,62 +35598,65 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 +#, fuzzy msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" "Finalmente, en lugar de ser instanciado/generado en ``Player.gd``, se va a " "generar en ``Globals.gd`` para que podamos crear sonidos desde cualquier " @@ -35544,17 +35664,23 @@ msgstr "" "cuando destruyamos el reproductor de audio, también lo eliminemos de una " "lista en ``Globals.gd``." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 +#, fuzzy +msgid "" +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." msgstr "" "Para las variables globales eliminamos todas las variables ``audio_[insertar " "nombre aquí]`` ya que en su lugar las pasaremos al archivo. También añadimos " @@ -35562,21 +35688,23 @@ msgstr "" "``should_loop`` para decir si queremos hacer un loop cuando el sonido haya " "terminado, y ``globals`` contendrá el ``Globals.gd`` singleton." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +#, fuzzy msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" msgstr "" "El único cambio en ``_ready`` es que ahora obtenemos el singleton ``Globals." "gd`` y lo asignamos a ``globals``" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +#, fuzzy msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" "En ``play_sound`` se espera un stream de audio, llamado ``audio_stream``, en " @@ -35587,13 +35715,15 @@ msgstr "" "singleton ```Globals.gd`` llamado ``created_audio``, y luego se libera el " "reproductor de audio." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 +#, fuzzy msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" "Finalmente, en ``sound_finished`` primero comprobamos si se debe usar " "``should_loop`` o no. Si se supone que debemos hacer un bucle, reproducimos " @@ -35602,81 +35732,87 @@ msgstr "" "la lista en el singleton ```Globals.gd`` llamado ``created_audio``, y luego " "liberamos el reproductor de audio." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 +#, fuzzy msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" +"``animation_speeds``: Un diccionario para contener todas las velocidades de " +"nuestras animaciones." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." @@ -35684,54 +35820,57 @@ msgstr "" "Recuerda, debemos tener cuidado al añadir nodos a un singleton, ya que estos " "nodos no se destruirán al cambiar de escena." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 +#, fuzzy msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" "Ahora todos los sonidos de nuestro FPS se pueden reproducir desde cualquier " "lugar. Todo lo que tenemos que hacer es tomar el singleton ``Globals.gd``, y " @@ -35739,14 +35878,15 @@ msgstr "" "si queremos que se reproduzca en bucle o no, y la posición para reproducir " "el sonido." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 +#, fuzzy msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" "Por ejemplo, si quieres reproducir un sonido de explosión cuando las " "granadas explotan necesitarás añadir un nuevo sonido a ``audio_clips`` en " @@ -35755,65 +35895,65 @@ msgstr "" "global_transform.origin)`` en las granadas ``_process``, justo después de " "que la granada dañe todos los cuerpos dentro de su radio de explosión." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -35821,26 +35961,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -42133,6 +42273,7 @@ msgstr "Un ejemplo:" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Animación" @@ -44651,9 +44792,10 @@ msgid "Configuring the imported translation" msgstr "Configuración de la traducción importada" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 +#, fuzzy msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" "Las traducciones pueden ser actualizadas y reimportadas cuando cambian, pero " @@ -54888,6 +55030,420 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +#, fuzzy +msgid "GDNative C++ example" +msgstr "GDNative / C++" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +#, fuzzy +msgid "Setting up your project" +msgstr "Creación de un proyecto" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +#, fuzzy +msgid "There are a few prerequisites you'll need:" +msgstr "Sin embargo, hay algunas diferencias:" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +#, fuzzy +msgid "Creating a simple plugin" +msgstr "Crear una animación simple" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +#, fuzzy +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "Comienza declarando las variables miembro que este objeto necesitará:" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -61309,126 +61865,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -61438,11 +61910,404 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Ruta de recursos" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +#, fuzzy +msgid "Skeleton" +msgstr "Singletons" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "El nodo AnimationPlayer" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +#, fuzzy +msgid "ArrayMesh" +msgstr "Arreglos" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +#, fuzzy +msgid "arrays" +msgstr "Arreglos" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +#, fuzzy +msgid "An example of ArrayMesh:" +msgstr "Algunos ejemplos de planos" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +#, fuzzy +msgid "path" +msgstr "Ruta de usuario" + +#: ../../docs/development/file_formats/tscn.rst:380 +#, fuzzy +msgid "interp" +msgstr "Center" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +#, fuzzy +msgid "imported" +msgstr "Importador CSV" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Transform" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Valor" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Constante PI." + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -64205,6 +65070,11 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +#, fuzzy +msgid "`Steincodes `_" +msgstr "`Youtube `_" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " @@ -64225,6 +65095,13 @@ msgid "" "`_" msgstr "" +#~ msgid "" +#~ "Then using the dotnet command line to restore package, in the project " +#~ "root::" +#~ msgstr "" +#~ "Luego se utiliza la línea de comandos dotnet para restaurar el paquete, " +#~ "en la raíz del proyecto:" + #~ msgid "Left: ``-60``" #~ msgstr "Left: ``-60``" diff --git a/weblate/es_MX.po b/weblate/es_MX.po index 4b129ee9b4..b863cf036c 100644 --- a/weblate/es_MX.po +++ b/weblate/es_MX.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-05-25 04:42+0000\n" "Last-Translator: Jonatan David Orozco Cantillo \n" "Language-Team: Spanish (Mexico) `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23310,30 +23312,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23341,121 +23343,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23463,13 +23465,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23477,44 +23479,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23522,14 +23524,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23538,44 +23540,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23584,27 +23587,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23612,162 +23616,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23775,158 +23781,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23961,7 +23967,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -23994,7 +24000,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24031,18 +24037,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24090,7 +24097,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24201,7 +24208,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24659,7 +24666,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24700,9 +24707,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24741,37 +24748,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24780,19 +24789,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24800,26 +24809,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24827,7 +24836,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24836,7 +24845,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24845,20 +24854,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24867,66 +24876,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24936,7 +24945,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24944,23 +24953,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24970,28 +24979,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25000,21 +25009,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25022,380 +25031,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25403,149 +25419,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25553,114 +25573,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25672,519 +25708,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26192,28 +26232,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26223,81 +26263,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26306,155 +26346,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26466,9 +26513,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26491,7 +26538,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26555,8 +26602,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26565,8 +26612,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26579,7 +26626,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26610,7 +26657,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26618,7 +26665,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26650,8 +26697,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26676,7 +26723,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26687,13 +26734,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26702,16 +26749,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26724,17 +26773,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26743,15 +26791,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26775,7 +26823,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26783,20 +26831,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26810,10 +26859,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26834,8 +26883,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26851,7 +26900,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26899,7 +26948,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26941,10 +26990,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26959,7 +27008,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26967,7 +27016,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -26995,8 +27044,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27005,7 +27054,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27021,8 +27070,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27067,20 +27116,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27089,7 +27138,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27099,17 +27148,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27118,8 +27167,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27144,42 +27194,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27252,15 +27304,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27268,8 +27320,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27314,12 +27365,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27370,51 +27421,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27424,23 +27477,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27452,15 +27505,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27503,7 +27556,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27525,48 +27578,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27625,11 +27678,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27638,8 +27691,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27653,16 +27706,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27672,26 +27726,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27704,7 +27758,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27719,209 +27775,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27929,79 +27992,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28009,127 +28072,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28138,74 +28201,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28214,290 +28280,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28505,184 +28572,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28690,37 +28763,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28804,7 +28877,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28867,8 +28940,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28891,7 +28964,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28901,118 +28974,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29020,51 +29093,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29073,19 +29147,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29094,80 +29167,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29176,42 +29255,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29221,21 +29300,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29243,7 +29322,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29252,7 +29331,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29261,412 +29340,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29674,7 +29758,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29682,301 +29766,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -29984,26 +30081,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34582,6 +34679,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36771,7 +36869,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46783,6 +46881,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53137,126 +53644,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53266,11 +53689,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -55982,6 +56786,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/fa.po b/weblate/fa.po index de146b1b30..1eb2e33f74 100644 --- a/weblate/fa.po +++ b/weblate/fa.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-09 01:41+0000\n" "Last-Translator: Amir Hossein Mafi \n" "Language-Team: Persian `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23363,30 +23365,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23394,121 +23396,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23516,13 +23518,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23530,44 +23532,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23575,14 +23577,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23591,44 +23593,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23637,27 +23640,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23665,162 +23669,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23828,158 +23834,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24014,7 +24020,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24047,7 +24053,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24084,18 +24090,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24143,7 +24150,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24254,7 +24261,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24712,7 +24719,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24753,9 +24760,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24794,37 +24801,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24833,19 +24842,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24853,26 +24862,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24880,7 +24889,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24889,7 +24898,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24898,20 +24907,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24920,66 +24929,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24989,7 +24998,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24997,23 +25006,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25023,28 +25032,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25053,21 +25062,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25075,380 +25084,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25456,149 +25472,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25606,114 +25626,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25725,519 +25761,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26245,28 +26285,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26276,81 +26316,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26359,155 +26399,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26519,9 +26566,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26544,7 +26591,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26608,8 +26655,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26618,8 +26665,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26632,7 +26679,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26663,7 +26710,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26671,7 +26718,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26703,8 +26750,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26729,7 +26776,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26740,13 +26787,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26755,16 +26802,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26777,17 +26826,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26796,15 +26844,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26828,7 +26876,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26836,20 +26884,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26863,10 +26912,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26887,8 +26936,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26904,7 +26953,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26952,7 +27001,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26994,10 +27043,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27012,7 +27061,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27020,7 +27069,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27048,8 +27097,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27058,7 +27107,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27074,8 +27123,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27120,20 +27169,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27142,7 +27191,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27152,17 +27201,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27171,8 +27220,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27197,42 +27247,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27305,15 +27357,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27321,8 +27373,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27367,12 +27418,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27423,51 +27474,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27477,23 +27530,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27505,15 +27558,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27556,7 +27609,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27578,48 +27631,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27678,11 +27731,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27691,8 +27744,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27706,16 +27759,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27725,26 +27779,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27757,7 +27811,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27772,209 +27828,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27982,79 +28045,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28062,127 +28125,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28191,74 +28254,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28267,290 +28333,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28558,184 +28625,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28743,37 +28816,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28857,7 +28930,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28920,8 +28993,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28944,7 +29017,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28954,118 +29027,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29073,51 +29146,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29126,19 +29200,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29147,80 +29220,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29229,42 +29308,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29274,21 +29353,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29296,7 +29375,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29305,7 +29384,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29314,412 +29393,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29727,7 +29811,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29735,301 +29819,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30037,26 +30134,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34635,6 +34732,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36824,7 +36922,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46836,6 +46934,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53192,126 +53699,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53321,11 +53744,393 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "ثابت ها" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56041,6 +56846,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/fi.po b/weblate/fi.po index f68367088d..417a84244b 100644 --- a/weblate/fi.po +++ b/weblate/fi.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-13 11:52+0000\n" "Last-Translator: ekeimaja \n" "Language-Team: Finnish `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23396,30 +23398,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23427,121 +23429,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23549,13 +23551,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23563,44 +23565,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23608,14 +23610,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23624,44 +23626,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23670,27 +23673,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23698,162 +23702,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23861,158 +23867,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24047,7 +24053,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24080,7 +24086,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24117,18 +24123,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24176,7 +24183,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24287,7 +24294,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24745,7 +24752,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24786,9 +24793,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24827,37 +24834,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24866,19 +24875,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24886,26 +24895,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24913,7 +24922,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24922,7 +24931,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24931,20 +24940,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24953,66 +24962,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25022,7 +25031,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25030,23 +25039,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25056,28 +25065,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25086,21 +25095,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25108,380 +25117,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25489,149 +25505,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25639,114 +25659,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25758,519 +25794,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26278,28 +26318,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26309,81 +26349,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26392,155 +26432,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26552,9 +26599,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26577,7 +26624,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26641,8 +26688,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26651,8 +26698,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26665,7 +26712,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26696,7 +26743,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26704,7 +26751,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26736,8 +26783,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26762,7 +26809,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26773,13 +26820,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26788,16 +26835,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26810,17 +26859,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26829,15 +26877,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26861,7 +26909,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26869,20 +26917,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26896,10 +26945,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26920,8 +26969,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26937,7 +26986,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26985,7 +27034,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27027,10 +27076,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27045,7 +27094,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27053,7 +27102,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27081,8 +27130,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27091,7 +27140,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27107,8 +27156,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27153,20 +27202,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27175,7 +27224,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27185,17 +27234,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27204,8 +27253,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27230,42 +27280,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27338,15 +27390,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27354,8 +27406,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27400,12 +27451,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27456,51 +27507,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27510,23 +27563,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27538,15 +27591,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27589,7 +27642,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27611,48 +27664,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27711,11 +27764,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27724,8 +27777,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27739,16 +27792,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27758,26 +27812,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27790,7 +27844,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27805,209 +27861,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28015,79 +28078,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28095,127 +28158,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28224,74 +28287,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28300,290 +28366,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28591,184 +28658,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28776,37 +28849,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28890,7 +28963,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28953,8 +29026,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28977,7 +29050,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28987,118 +29060,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29106,51 +29179,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29159,19 +29233,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29180,80 +29253,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29262,42 +29341,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29307,21 +29386,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29329,7 +29408,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29338,7 +29417,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29347,412 +29426,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29760,7 +29844,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29768,301 +29852,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30070,26 +30167,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34668,6 +34765,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Animaatio" @@ -36857,7 +36955,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46869,6 +46967,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53223,126 +53730,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53352,11 +53775,397 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Resurssipolku" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Animaatio" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Muunna" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Arvo" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Vakiot" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56072,6 +56881,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/fil.po b/weblate/fil.po index 7c17346e26..4ee3dc6192 100644 --- a/weblate/fil.po +++ b/weblate/fil.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-05-15 01:36+0000\n" "Last-Translator: Daris C. Mondigo \n" "Language-Team: Filipino `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23292,30 +23294,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23323,121 +23325,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23445,13 +23447,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23459,44 +23461,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23504,14 +23506,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23520,44 +23522,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23566,27 +23569,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23594,162 +23598,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23757,158 +23763,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23943,7 +23949,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -23976,7 +23982,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24013,18 +24019,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24072,7 +24079,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24183,7 +24190,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24641,7 +24648,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24682,9 +24689,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24723,37 +24730,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24762,19 +24771,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24782,26 +24791,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24809,7 +24818,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24818,7 +24827,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24827,20 +24836,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24849,66 +24858,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24918,7 +24927,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24926,23 +24935,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24952,28 +24961,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -24982,21 +24991,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25004,380 +25013,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25385,149 +25401,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25535,114 +25555,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25654,519 +25690,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26174,28 +26214,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26205,81 +26245,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26288,155 +26328,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26448,9 +26495,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26473,7 +26520,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26537,8 +26584,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26547,8 +26594,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26561,7 +26608,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26592,7 +26639,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26600,7 +26647,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26632,8 +26679,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26658,7 +26705,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26669,13 +26716,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26684,16 +26731,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26706,17 +26755,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26725,15 +26773,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26757,7 +26805,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26765,20 +26813,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26792,10 +26841,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26816,8 +26865,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26833,7 +26882,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26881,7 +26930,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26923,10 +26972,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26941,7 +26990,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26949,7 +26998,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -26977,8 +27026,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -26987,7 +27036,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27003,8 +27052,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27049,20 +27098,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27071,7 +27120,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27081,17 +27130,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27100,8 +27149,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27126,42 +27176,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27234,15 +27286,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27250,8 +27302,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27296,12 +27347,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27352,51 +27403,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27406,23 +27459,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27434,15 +27487,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27485,7 +27538,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27507,48 +27560,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27607,11 +27660,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27620,8 +27673,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27635,16 +27688,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27654,26 +27708,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27686,7 +27740,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27701,209 +27757,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27911,79 +27974,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -27991,127 +28054,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28120,74 +28183,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28196,290 +28262,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28487,184 +28554,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28672,37 +28745,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28786,7 +28859,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28849,8 +28922,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28873,7 +28946,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28883,118 +28956,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29002,51 +29075,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29055,19 +29129,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29076,80 +29149,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29158,42 +29237,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29203,21 +29282,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29225,7 +29304,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29234,7 +29313,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29243,412 +29322,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29656,7 +29740,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29664,301 +29748,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -29966,26 +30063,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34564,6 +34661,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36753,7 +36851,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46765,6 +46863,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53119,126 +53626,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53248,11 +53671,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -55964,6 +56768,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/fr.po b/weblate/fr.po index dc5c2f5b06..7d61f3cc91 100644 --- a/weblate/fr.po +++ b/weblate/fr.po @@ -36,7 +36,7 @@ msgid "" msgstr "" "Project-Id-Version: French (Godot Engine)\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-13 11:52+0000\n" "Last-Translator: Mohamed Ali Salman Meftah \n" "Language-Team: French `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -28304,30 +28306,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -28335,122 +28337,122 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 #, fuzzy msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr ":ref:`Vector3 `" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -28458,13 +28460,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -28472,44 +28474,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -28517,14 +28519,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -28533,44 +28535,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -28579,27 +28582,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -28607,162 +28611,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -28770,158 +28776,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -28956,7 +28962,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -28989,7 +28995,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -29026,18 +29032,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -29085,7 +29092,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -29196,7 +29203,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -29654,7 +29661,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -29695,9 +29702,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -29736,37 +29743,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -29775,19 +29784,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -29795,26 +29804,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -29822,7 +29831,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -29831,7 +29840,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -29840,20 +29849,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -29862,66 +29871,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -29931,7 +29940,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -29939,23 +29948,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -29965,28 +29974,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -29995,21 +30004,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -30017,380 +30026,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -30398,149 +30414,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -30548,114 +30568,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -30667,519 +30703,527 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +#, fuzzy +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" +"Ajouter un script au ``Mob`` et ajouter les variables membres suivantes :" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 +#, fuzzy msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" +"Ajouter un script au ``Mob`` et ajouter les variables membres suivantes :" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -31187,28 +31231,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -31218,81 +31262,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -31301,155 +31345,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -31461,9 +31512,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -31486,7 +31537,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -31550,8 +31601,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -31560,8 +31611,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -31574,7 +31625,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -31605,7 +31656,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -31613,7 +31664,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -31645,8 +31696,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -31671,7 +31722,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -31682,13 +31733,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -31697,16 +31748,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -31719,17 +31772,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -31738,16 +31790,18 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +#, fuzzy +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" +"Ajouter un script au ``Mob`` et ajouter les variables membres suivantes :" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 msgid "Let's go over what each of these new variables will be doing:" @@ -31770,7 +31824,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -31778,20 +31832,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -31805,10 +31860,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -31829,8 +31884,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -31846,7 +31901,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -31894,7 +31949,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -31936,10 +31991,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -31954,7 +32009,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -31962,7 +32017,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -31990,8 +32045,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -32000,7 +32055,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -32016,8 +32071,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -32062,21 +32117,23 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +#, fuzzy +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" +"Ajouter un script au ``Mob`` et ajouter les variables membres suivantes :" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 msgid "``MAX_HEALTH``: The maximum amount of health a player can have." @@ -32084,7 +32141,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -32094,17 +32151,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -32113,8 +32170,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -32139,42 +32197,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -32247,15 +32307,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -32263,8 +32323,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -32309,12 +32368,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -32365,52 +32424,54 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 #, fuzzy -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "Dans ce cas, la valeur peut être lue à partir d'un *Port de données*." #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -32420,23 +32481,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -32448,15 +32509,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -32499,7 +32560,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -32522,48 +32583,48 @@ msgstr "Ajouter d'autres nœuds" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -32622,11 +32683,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -32635,8 +32696,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -32650,16 +32711,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -32669,26 +32731,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -32701,7 +32763,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -32716,209 +32780,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -32926,79 +32997,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -33006,127 +33077,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -33135,74 +33206,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -33211,290 +33285,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -33502,184 +33577,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -33687,37 +33768,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -33801,7 +33882,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -33864,8 +33945,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -33888,7 +33969,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -33898,118 +33979,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -34017,51 +34098,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -34070,19 +34152,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -34091,80 +34172,88 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +#, fuzzy +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" +"Ajouter un script au ``Mob`` et ajouter les variables membres suivantes :" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -34173,42 +34262,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -34218,21 +34307,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -34240,7 +34329,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -34249,7 +34338,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -34258,412 +34347,418 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." -msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +#, fuzzy +msgid "Now all of the weapons will reset when the player dies." +msgstr "Fais un fondu de la barre quand le joueur meurt" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -34671,7 +34766,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -34679,301 +34774,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -34981,26 +35089,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -39580,6 +39688,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Animation" @@ -41769,7 +41878,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -51789,6 +51898,422 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +#, fuzzy +msgid "GDNative C++ example" +msgstr "GDNative / C++" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +#, fuzzy +msgid "Setting up your project" +msgstr "Créer un nouveau projet" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +#, fuzzy +msgid "There are a few prerequisites you'll need:" +msgstr "Il y a cependant quelques différences :" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +#, fuzzy +msgid "Creating a simple plugin" +msgstr "Création d'un script C#" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +#, fuzzy +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" +"Commencez par déclarer les variables membres dont cet objet aura besoin :" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +#, fuzzy +msgid "Compiling our plugin" +msgstr "Compilation" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "Spécifique à la plateforme" @@ -58264,126 +58789,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -58393,11 +58834,403 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Chemin de la ressource" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +#, fuzzy +msgid "Skeleton" +msgstr "Singletons" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Animation" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +#, fuzzy +msgid "ArrayMesh" +msgstr "Les tableaux" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +#, fuzzy +msgid "arrays" +msgstr "Les tableaux" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +#, fuzzy +msgid "vertex color array" +msgstr "Couleur de vertex" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +#, fuzzy +msgid "interp" +msgstr "Center" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +#, fuzzy +msgid "imported" +msgstr "Import CSV" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Transformation" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Valeur" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Constante PI." + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -61114,6 +61947,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/he.po b/weblate/he.po index d5c271f514..ba06601c0c 100644 --- a/weblate/he.po +++ b/weblate/he.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-04-20 14:38+0000\n" "Last-Translator: Yaron Shahrabani \n" "Language-Team: Hebrew `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23351,30 +23353,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23382,121 +23384,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23504,13 +23506,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23518,44 +23520,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23563,14 +23565,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23579,44 +23581,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23625,27 +23628,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23653,162 +23657,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23816,158 +23822,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24002,7 +24008,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24035,7 +24041,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24072,18 +24078,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24131,7 +24138,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24242,7 +24249,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24700,7 +24707,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24741,9 +24748,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24782,37 +24789,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24821,19 +24830,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24841,26 +24850,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24868,7 +24877,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24877,7 +24886,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24886,20 +24895,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24908,66 +24917,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24977,7 +24986,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24985,23 +24994,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25011,28 +25020,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25041,21 +25050,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25063,380 +25072,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25444,149 +25460,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25594,114 +25614,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25713,519 +25749,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26233,28 +26273,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26264,81 +26304,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26347,155 +26387,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26507,9 +26554,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26532,7 +26579,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26596,8 +26643,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26606,8 +26653,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26620,7 +26667,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26651,7 +26698,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26659,7 +26706,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26691,8 +26738,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26717,7 +26764,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26728,13 +26775,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26743,16 +26790,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26765,17 +26814,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26784,15 +26832,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26816,7 +26864,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26824,20 +26872,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26851,10 +26900,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26875,8 +26924,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26892,7 +26941,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26940,7 +26989,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26982,10 +27031,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27000,7 +27049,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27008,7 +27057,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27036,8 +27085,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27046,7 +27095,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27062,8 +27111,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27108,20 +27157,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27130,7 +27179,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27140,17 +27189,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27159,8 +27208,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27185,42 +27235,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27293,15 +27345,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27309,8 +27361,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27355,12 +27406,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27411,51 +27462,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27465,23 +27518,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27493,15 +27546,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27544,7 +27597,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27566,48 +27619,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27666,11 +27719,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27679,8 +27732,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27694,16 +27747,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27713,26 +27767,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27745,7 +27799,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27760,209 +27816,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27970,79 +28033,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28050,127 +28113,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28179,74 +28242,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28255,290 +28321,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28546,184 +28613,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28731,37 +28804,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28845,7 +28918,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28908,8 +28981,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28932,7 +29005,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28942,118 +29015,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29061,51 +29134,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29114,19 +29188,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29135,80 +29208,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29217,42 +29296,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29262,21 +29341,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29284,7 +29363,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29293,7 +29372,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29302,412 +29381,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29715,7 +29799,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29723,301 +29807,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30025,26 +30122,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34623,6 +34720,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36812,7 +36910,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46824,6 +46922,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53179,126 +53686,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53308,11 +53731,396 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "נתיב" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "אנימציות" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "התמרה" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "קבועים" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56028,6 +56836,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/hu.po b/weblate/hu.po index 8c19564c0b..23dae0812e 100644 --- a/weblate/hu.po +++ b/weblate/hu.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-12 16:39+0000\n" "Last-Translator: Árpád Horváth \n" "Language-Team: Hungarian `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23292,30 +23294,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23323,121 +23325,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23445,13 +23447,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23459,44 +23461,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23504,14 +23506,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23520,44 +23522,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23566,27 +23569,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23594,162 +23598,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23757,158 +23763,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23943,7 +23949,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -23976,7 +23982,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24013,18 +24019,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24072,7 +24079,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24183,7 +24190,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24641,7 +24648,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24682,9 +24689,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24723,37 +24730,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24762,19 +24771,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24782,26 +24791,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24809,7 +24818,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24818,7 +24827,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24827,20 +24836,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24849,66 +24858,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24918,7 +24927,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24926,23 +24935,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24952,28 +24961,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -24982,21 +24991,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25004,380 +25013,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25385,149 +25401,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25535,114 +25555,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25654,519 +25690,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26174,28 +26214,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26205,81 +26245,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26288,155 +26328,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26448,9 +26495,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26473,7 +26520,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26537,8 +26584,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26547,8 +26594,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26561,7 +26608,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26592,7 +26639,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26600,7 +26647,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26632,8 +26679,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26658,7 +26705,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26669,13 +26716,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26684,16 +26731,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26706,17 +26755,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26725,15 +26773,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26757,7 +26805,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26765,20 +26813,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26792,10 +26841,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26816,8 +26865,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26833,7 +26882,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26881,7 +26930,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26923,10 +26972,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26941,7 +26990,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26949,7 +26998,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -26977,8 +27026,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -26987,7 +27036,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27003,8 +27052,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27049,20 +27098,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27071,7 +27120,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27081,17 +27130,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27100,8 +27149,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27126,42 +27176,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27234,15 +27286,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27250,8 +27302,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27296,12 +27347,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27352,51 +27403,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27406,23 +27459,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27434,15 +27487,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27485,7 +27538,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27507,48 +27560,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27607,11 +27660,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27620,8 +27673,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27635,16 +27688,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27654,26 +27708,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27686,7 +27740,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27701,209 +27757,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27911,79 +27974,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -27991,127 +28054,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28120,74 +28183,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28196,290 +28262,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28487,184 +28554,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28672,37 +28745,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28786,7 +28859,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28849,8 +28922,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28873,7 +28946,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28883,118 +28956,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29002,51 +29075,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29055,19 +29129,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29076,80 +29149,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29158,42 +29237,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29203,21 +29282,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29225,7 +29304,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29234,7 +29313,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29243,412 +29322,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29656,7 +29740,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29664,301 +29748,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -29966,26 +30063,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34564,6 +34661,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36753,7 +36851,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46765,6 +46863,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53119,126 +53626,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53248,11 +53671,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -55964,6 +56768,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/id.po b/weblate/id.po index d88b2c7955..958c2bee6c 100644 --- a/weblate/id.po +++ b/weblate/id.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-05-31 16:39+0000\n" "Last-Translator: Reza Hidayat Bayu Prabowo \n" "Language-Team: Indonesian `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23345,30 +23347,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23376,121 +23378,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23498,13 +23500,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23512,44 +23514,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23557,14 +23559,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23573,44 +23575,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23619,27 +23622,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23647,162 +23651,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23810,158 +23816,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23996,7 +24002,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24029,7 +24035,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24066,18 +24072,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24125,7 +24132,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24236,7 +24243,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24694,7 +24701,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24735,9 +24742,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24776,37 +24783,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24815,19 +24824,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24835,26 +24844,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24862,7 +24871,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24871,7 +24880,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24880,20 +24889,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24902,66 +24911,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24971,7 +24980,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24979,23 +24988,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25005,28 +25014,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25035,21 +25044,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25057,380 +25066,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25438,149 +25454,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25588,114 +25608,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25707,519 +25743,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26227,28 +26267,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26258,81 +26298,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26341,155 +26381,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26501,9 +26548,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26526,7 +26573,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26590,8 +26637,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26600,8 +26647,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26614,7 +26661,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26645,7 +26692,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26653,7 +26700,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26685,8 +26732,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26711,7 +26758,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26722,13 +26769,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26737,16 +26784,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26759,17 +26808,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26778,15 +26826,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26810,7 +26858,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26818,20 +26866,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26845,10 +26894,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26869,8 +26918,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26886,7 +26935,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26934,7 +26983,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26976,10 +27025,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26994,7 +27043,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27002,7 +27051,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27030,8 +27079,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27040,7 +27089,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27056,8 +27105,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27102,20 +27151,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27124,7 +27173,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27134,17 +27183,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27153,8 +27202,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27179,42 +27229,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27287,15 +27339,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27303,8 +27355,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27349,12 +27400,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27405,51 +27456,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27459,23 +27512,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27487,15 +27540,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27538,7 +27591,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27560,48 +27613,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27660,11 +27713,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27673,8 +27726,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27688,16 +27741,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27707,26 +27761,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27739,7 +27793,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27754,209 +27810,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27964,79 +28027,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28044,127 +28107,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28173,74 +28236,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28249,290 +28315,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28540,184 +28607,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28725,37 +28798,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28839,7 +28912,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28902,8 +28975,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28926,7 +28999,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28936,118 +29009,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29055,51 +29128,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29108,19 +29182,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29129,80 +29202,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29211,42 +29290,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29256,21 +29335,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29278,7 +29357,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29287,7 +29366,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29296,412 +29375,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29709,7 +29793,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29717,301 +29801,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30019,26 +30116,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34617,6 +34714,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36806,7 +36904,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46818,6 +46916,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53172,126 +53679,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53301,11 +53724,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56021,6 +56825,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/it.po b/weblate/it.po index 08363dd842..b3e7b0b2e7 100644 --- a/weblate/it.po +++ b/weblate/it.po @@ -17,7 +17,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-05-28 08:21+0000\n" "Last-Translator: Andrea Brunato \n" "Language-Team: Italian `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23664,30 +23666,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23695,121 +23697,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23817,13 +23819,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23831,44 +23833,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23876,14 +23878,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23892,44 +23894,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23938,27 +23941,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23966,162 +23970,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -24129,158 +24135,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24315,7 +24321,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24348,7 +24354,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24385,18 +24391,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24444,7 +24451,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24555,7 +24562,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -25013,7 +25020,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -25054,9 +25061,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -25095,37 +25102,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -25134,19 +25143,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -25154,26 +25163,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -25181,7 +25190,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -25190,7 +25199,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -25199,20 +25208,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -25221,66 +25230,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25290,7 +25299,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25298,23 +25307,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25324,28 +25333,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25354,21 +25363,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25376,380 +25385,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25757,149 +25773,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25907,114 +25927,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -26026,519 +26062,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26546,28 +26586,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26577,81 +26617,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26660,155 +26700,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26820,9 +26867,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26845,7 +26892,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26909,8 +26956,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26919,8 +26966,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26933,7 +26980,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26964,7 +27011,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26972,7 +27019,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -27004,8 +27051,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -27030,7 +27077,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -27041,13 +27088,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -27056,16 +27103,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -27078,17 +27127,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -27097,15 +27145,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -27129,7 +27177,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -27137,20 +27185,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -27164,10 +27213,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -27188,8 +27237,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -27205,7 +27254,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27253,7 +27302,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27295,10 +27344,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27313,7 +27362,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27321,7 +27370,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27349,8 +27398,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27359,7 +27408,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27375,8 +27424,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27421,20 +27470,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27443,7 +27492,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27453,17 +27502,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27472,8 +27521,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27498,42 +27548,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27606,15 +27658,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27622,8 +27674,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27668,12 +27719,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27724,51 +27775,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27778,23 +27831,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27806,15 +27859,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27857,7 +27910,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27879,48 +27932,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27979,11 +28032,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27992,8 +28045,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -28007,16 +28060,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -28026,26 +28080,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -28058,7 +28112,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -28073,209 +28129,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28283,79 +28346,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28363,127 +28426,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28492,74 +28555,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28568,290 +28634,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28859,184 +28926,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -29044,37 +29117,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -29158,7 +29231,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -29221,8 +29294,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -29245,7 +29318,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29255,118 +29328,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29374,51 +29447,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29427,19 +29501,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29448,80 +29521,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29530,42 +29609,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29575,21 +29654,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29597,7 +29676,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29606,7 +29685,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29615,412 +29694,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -30028,7 +30112,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -30036,301 +30120,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30338,26 +30435,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34936,6 +35033,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -37125,7 +37223,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -47137,6 +47235,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53492,126 +53999,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53621,11 +54044,393 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Costanti" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56342,6 +57147,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/ja.po b/weblate/ja.po index 588124c316..37a6e26ce5 100644 --- a/weblate/ja.po +++ b/weblate/ja.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-13 11:52+0000\n" "Last-Translator: zukkun \n" "Language-Team: Japanese `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23327,30 +23329,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23358,121 +23360,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23480,13 +23482,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23494,44 +23496,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23539,14 +23541,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23555,44 +23557,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23601,27 +23604,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23629,162 +23633,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23792,158 +23798,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23978,7 +23984,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24011,7 +24017,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24048,18 +24054,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24107,7 +24114,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24218,7 +24225,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24676,7 +24683,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24717,9 +24724,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24758,37 +24765,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24797,19 +24806,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24817,26 +24826,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24844,7 +24853,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24853,7 +24862,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24862,20 +24871,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24884,66 +24893,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24953,7 +24962,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24961,23 +24970,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24987,28 +24996,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25017,21 +25026,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25039,380 +25048,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25420,149 +25436,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25570,114 +25590,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25689,519 +25725,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26209,28 +26249,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26240,81 +26280,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26323,155 +26363,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26483,9 +26530,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26508,7 +26555,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26572,8 +26619,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26582,8 +26629,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26596,7 +26643,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26627,7 +26674,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26635,7 +26682,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26667,8 +26714,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26693,7 +26740,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26704,13 +26751,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26719,16 +26766,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26741,17 +26790,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26760,15 +26808,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26792,7 +26840,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26800,20 +26848,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26827,10 +26876,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26851,8 +26900,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26868,7 +26917,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26916,7 +26965,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26958,10 +27007,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26976,7 +27025,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26984,7 +27033,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27012,8 +27061,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27022,7 +27071,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27038,8 +27087,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27084,20 +27133,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27106,7 +27155,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27116,17 +27165,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27135,8 +27184,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27161,42 +27211,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27269,15 +27321,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27285,8 +27337,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27331,12 +27382,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27387,51 +27438,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27441,23 +27494,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27469,15 +27522,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27520,7 +27573,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27542,48 +27595,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27642,11 +27695,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27655,8 +27708,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27670,16 +27723,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27689,26 +27743,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27721,7 +27775,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27736,209 +27792,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27946,79 +28009,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28026,127 +28089,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28155,74 +28218,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28231,290 +28297,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28522,184 +28589,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28707,37 +28780,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28821,7 +28894,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28884,8 +28957,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28908,7 +28981,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28918,118 +28991,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29037,51 +29110,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29090,19 +29164,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29111,80 +29184,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29193,42 +29272,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29238,21 +29317,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29260,7 +29339,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29269,7 +29348,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29278,412 +29357,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29691,7 +29775,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29699,301 +29783,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30001,26 +30098,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34599,6 +34696,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "アニメーション" @@ -36788,7 +36886,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46800,6 +46898,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53154,126 +53661,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53283,11 +53706,395 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "リソースのパス" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "アニメーション" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "値" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56004,6 +56811,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/ko.po b/weblate/ko.po index 5c3a1847ce..da672f4500 100644 --- a/weblate/ko.po +++ b/weblate/ko.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-11 16:39+0000\n" "Last-Translator: 송태섭 \n" "Language-Team: Korean `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23924,30 +23926,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23955,121 +23957,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -24077,13 +24079,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -24091,44 +24093,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -24136,14 +24138,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -24152,44 +24154,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -24198,27 +24201,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -24226,162 +24230,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -24389,158 +24395,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24575,7 +24581,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24608,7 +24614,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24645,18 +24651,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24704,7 +24711,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24815,7 +24822,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -25273,7 +25280,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -25314,9 +25321,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -25355,37 +25362,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -25394,19 +25403,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -25414,26 +25423,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -25441,7 +25450,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -25450,7 +25459,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -25459,20 +25468,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -25481,66 +25490,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25550,7 +25559,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25558,23 +25567,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25584,28 +25593,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25614,21 +25623,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25636,380 +25645,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -26017,149 +26033,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -26167,114 +26187,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -26286,519 +26322,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26806,28 +26846,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26837,81 +26877,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26920,155 +26960,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -27080,9 +27127,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -27105,7 +27152,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -27169,8 +27216,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -27179,8 +27226,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -27193,7 +27240,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -27224,7 +27271,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -27232,7 +27279,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -27264,8 +27311,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -27290,7 +27337,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -27301,13 +27348,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -27316,16 +27363,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -27338,17 +27387,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -27357,15 +27405,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -27389,7 +27437,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -27397,20 +27445,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -27424,10 +27473,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -27448,8 +27497,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -27465,7 +27514,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27513,7 +27562,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27555,10 +27604,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27573,7 +27622,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27581,7 +27630,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27609,8 +27658,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27619,7 +27668,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27635,8 +27684,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27681,20 +27730,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27703,7 +27752,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27713,17 +27762,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27732,8 +27781,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27758,42 +27808,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27866,15 +27918,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27882,8 +27934,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27928,12 +27979,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27984,51 +28035,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -28038,23 +28091,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -28066,15 +28119,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -28117,7 +28170,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -28139,48 +28192,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -28239,11 +28292,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -28252,8 +28305,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -28267,16 +28320,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -28286,26 +28340,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -28318,7 +28372,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -28333,209 +28389,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28543,79 +28606,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28623,127 +28686,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28752,74 +28815,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28828,290 +28894,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -29119,184 +29186,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -29304,37 +29377,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -29418,7 +29491,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -29481,8 +29554,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -29505,7 +29578,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29515,118 +29588,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29634,51 +29707,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29687,19 +29761,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29708,80 +29781,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29790,42 +29869,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29835,21 +29914,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29857,7 +29936,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29866,7 +29945,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29875,412 +29954,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -30288,7 +30372,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -30296,301 +30380,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30598,26 +30695,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -35196,6 +35293,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "애니메이션" @@ -37385,7 +37483,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -47397,6 +47495,418 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +#, fuzzy +msgid "GDNative C++ example" +msgstr "GDNative / C++" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +#, fuzzy +msgid "Setting up your project" +msgstr "새 프로젝트 만들기" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +#, fuzzy +msgid "Creating a simple plugin" +msgstr "새 프로젝트 만들기" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53751,126 +54261,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53880,11 +54306,399 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "리소스 경로" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "애니메이션" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +#, fuzzy +msgid "ArrayMesh" +msgstr "배열" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +#, fuzzy +msgid "arrays" +msgstr "배열" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "변형" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "값" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "PI 상수." + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56600,6 +57414,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/lt.po b/weblate/lt.po index 91a3bd1d58..ad66445640 100644 --- a/weblate/lt.po +++ b/weblate/lt.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-12 09:40+0000\n" "Last-Translator: Kornelijus \n" "Language-Team: Lithuanian `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23304,30 +23306,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23335,121 +23337,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23457,13 +23459,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23471,44 +23473,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23516,14 +23518,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23532,44 +23534,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23578,27 +23581,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23606,162 +23610,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23769,158 +23775,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23955,7 +23961,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -23988,7 +23994,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24025,18 +24031,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24084,7 +24091,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24195,7 +24202,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24653,7 +24660,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24694,9 +24701,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24735,37 +24742,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24774,19 +24783,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24794,26 +24803,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24821,7 +24830,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24830,7 +24839,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24839,20 +24848,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24861,66 +24870,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24930,7 +24939,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24938,23 +24947,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24964,28 +24973,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -24994,21 +25003,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25016,380 +25025,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25397,149 +25413,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25547,114 +25567,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25666,519 +25702,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26186,28 +26226,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26217,81 +26257,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26300,155 +26340,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26460,9 +26507,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26485,7 +26532,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26549,8 +26596,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26559,8 +26606,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26573,7 +26620,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26604,7 +26651,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26612,7 +26659,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26644,8 +26691,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26670,7 +26717,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26681,13 +26728,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26696,16 +26743,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26718,17 +26767,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26737,15 +26785,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26769,7 +26817,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26777,20 +26825,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26804,10 +26853,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26828,8 +26877,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26845,7 +26894,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26893,7 +26942,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26935,10 +26984,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26953,7 +27002,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26961,7 +27010,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -26989,8 +27038,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -26999,7 +27048,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27015,8 +27064,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27061,20 +27110,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27083,7 +27132,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27093,17 +27142,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27112,8 +27161,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27138,42 +27188,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27246,15 +27298,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27262,8 +27314,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27308,12 +27359,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27364,51 +27415,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27418,23 +27471,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27446,15 +27499,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27497,7 +27550,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27519,48 +27572,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27619,11 +27672,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27632,8 +27685,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27647,16 +27700,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27666,26 +27720,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27698,7 +27752,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27713,209 +27769,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27923,79 +27986,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28003,127 +28066,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28132,74 +28195,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28208,290 +28274,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28499,184 +28566,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28684,37 +28757,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28798,7 +28871,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28861,8 +28934,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28885,7 +28958,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28895,118 +28968,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29014,51 +29087,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29067,19 +29141,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29088,80 +29161,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29170,42 +29249,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29215,21 +29294,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29237,7 +29316,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29246,7 +29325,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29255,412 +29334,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29668,7 +29752,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29676,301 +29760,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -29978,26 +30075,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34576,6 +34673,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36765,7 +36863,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46777,6 +46875,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53131,126 +53638,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53260,11 +53683,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -55976,6 +56780,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/ms.po b/weblate/ms.po index 186664a28e..a3c756b59d 100644 --- a/weblate/ms.po +++ b/weblate/ms.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: Malay `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23286,30 +23288,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23317,121 +23319,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23439,13 +23441,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23453,44 +23455,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23498,14 +23500,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23514,44 +23516,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23560,27 +23563,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23588,162 +23592,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23751,158 +23757,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23937,7 +23943,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -23970,7 +23976,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24007,18 +24013,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24066,7 +24073,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24177,7 +24184,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24635,7 +24642,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24676,9 +24683,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24717,37 +24724,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24756,19 +24765,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24776,26 +24785,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24803,7 +24812,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24812,7 +24821,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24821,20 +24830,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24843,66 +24852,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24912,7 +24921,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24920,23 +24929,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24946,28 +24955,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -24976,21 +24985,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -24998,380 +25007,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25379,149 +25395,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25529,114 +25549,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25648,519 +25684,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26168,28 +26208,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26199,81 +26239,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26282,155 +26322,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26442,9 +26489,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26467,7 +26514,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26531,8 +26578,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26541,8 +26588,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26555,7 +26602,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26586,7 +26633,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26594,7 +26641,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26626,8 +26673,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26652,7 +26699,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26663,13 +26710,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26678,16 +26725,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26700,17 +26749,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26719,15 +26767,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26751,7 +26799,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26759,20 +26807,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26786,10 +26835,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26810,8 +26859,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26827,7 +26876,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26875,7 +26924,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26917,10 +26966,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26935,7 +26984,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26943,7 +26992,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -26971,8 +27020,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -26981,7 +27030,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -26997,8 +27046,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27043,20 +27092,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27065,7 +27114,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27075,17 +27124,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27094,8 +27143,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27120,42 +27170,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27228,15 +27280,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27244,8 +27296,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27290,12 +27341,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27346,51 +27397,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27400,23 +27453,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27428,15 +27481,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27479,7 +27532,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27501,48 +27554,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27601,11 +27654,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27614,8 +27667,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27629,16 +27682,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27648,26 +27702,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27680,7 +27734,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27695,209 +27751,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27905,79 +27968,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -27985,127 +28048,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28114,74 +28177,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28190,290 +28256,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28481,184 +28548,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28666,37 +28739,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28780,7 +28853,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28843,8 +28916,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28867,7 +28940,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28877,118 +28950,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -28996,51 +29069,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29049,19 +29123,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29070,80 +29143,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29152,42 +29231,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29197,21 +29276,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29219,7 +29298,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29228,7 +29307,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29237,412 +29316,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29650,7 +29734,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29658,301 +29742,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -29960,26 +30057,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34558,6 +34655,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36747,7 +36845,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46759,6 +46857,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53113,126 +53620,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53242,11 +53665,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -55958,6 +56762,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/nb.po b/weblate/nb.po index 3a3c232b36..9c6c49e526 100644 --- a/weblate/nb.po +++ b/weblate/nb.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-11 12:40+0000\n" "Last-Translator: Elias \n" "Language-Team: Norwegian Bokmål `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23294,30 +23296,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23325,121 +23327,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23447,13 +23449,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23461,44 +23463,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23506,14 +23508,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23522,44 +23524,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23568,27 +23571,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23596,162 +23600,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23759,158 +23765,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23945,7 +23951,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -23978,7 +23984,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24015,18 +24021,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24074,7 +24081,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24185,7 +24192,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24643,7 +24650,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24684,9 +24691,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24725,37 +24732,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24764,19 +24773,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24784,26 +24793,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24811,7 +24820,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24820,7 +24829,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24829,20 +24838,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24851,66 +24860,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24920,7 +24929,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24928,23 +24937,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24954,28 +24963,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -24984,21 +24993,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25006,380 +25015,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25387,149 +25403,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25537,114 +25557,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25656,519 +25692,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26176,28 +26216,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26207,81 +26247,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26290,155 +26330,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26450,9 +26497,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26475,7 +26522,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26539,8 +26586,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26549,8 +26596,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26563,7 +26610,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26594,7 +26641,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26602,7 +26649,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26634,8 +26681,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26660,7 +26707,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26671,13 +26718,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26686,16 +26733,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26708,17 +26757,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26727,15 +26775,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26759,7 +26807,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26767,20 +26815,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26794,10 +26843,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26818,8 +26867,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26835,7 +26884,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26883,7 +26932,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26925,10 +26974,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26943,7 +26992,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26951,7 +27000,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -26979,8 +27028,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -26989,7 +27038,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27005,8 +27054,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27051,20 +27100,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27073,7 +27122,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27083,17 +27132,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27102,8 +27151,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27128,42 +27178,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27236,15 +27288,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27252,8 +27304,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27298,12 +27349,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27354,51 +27405,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27408,23 +27461,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27436,15 +27489,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27487,7 +27540,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27509,48 +27562,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27609,11 +27662,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27622,8 +27675,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27637,16 +27690,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27656,26 +27710,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27688,7 +27742,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27703,209 +27759,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27913,79 +27976,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -27993,127 +28056,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28122,74 +28185,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28198,290 +28264,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28489,184 +28556,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28674,37 +28747,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28788,7 +28861,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28851,8 +28924,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28875,7 +28948,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28885,118 +28958,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29004,51 +29077,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29057,19 +29131,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29078,80 +29151,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29160,42 +29239,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29205,21 +29284,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29227,7 +29306,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29236,7 +29315,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29245,412 +29324,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29658,7 +29742,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29666,301 +29750,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -29968,26 +30065,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34566,6 +34663,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36755,7 +36853,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46767,6 +46865,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53121,126 +53628,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53250,11 +53673,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -55966,6 +56770,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/nl.po b/weblate/nl.po index 8398279e13..e398ae59b0 100644 --- a/weblate/nl.po +++ b/weblate/nl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-06 07:06+0000\n" "Last-Translator: jaron maene \n" "Language-Team: Dutch `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23308,30 +23310,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23339,121 +23341,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23461,13 +23463,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23475,44 +23477,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23520,14 +23522,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23536,44 +23538,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23582,27 +23585,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23610,162 +23614,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23773,158 +23779,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23959,7 +23965,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -23992,7 +23998,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24029,18 +24035,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24088,7 +24095,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24199,7 +24206,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24657,7 +24664,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24698,9 +24705,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24739,37 +24746,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24778,19 +24787,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24798,26 +24807,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24825,7 +24834,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24834,7 +24843,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24843,20 +24852,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24865,66 +24874,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24934,7 +24943,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24942,23 +24951,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24968,28 +24977,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -24998,21 +25007,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25020,380 +25029,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25401,149 +25417,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25551,114 +25571,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25670,519 +25706,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26190,28 +26230,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26221,81 +26261,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26304,155 +26344,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26464,9 +26511,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26489,7 +26536,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26553,8 +26600,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26563,8 +26610,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26577,7 +26624,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26608,7 +26655,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26616,7 +26663,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26648,8 +26695,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26674,7 +26721,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26685,13 +26732,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26700,16 +26747,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26722,17 +26771,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26741,15 +26789,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26773,7 +26821,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26781,20 +26829,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26808,10 +26857,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26832,8 +26881,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26849,7 +26898,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26897,7 +26946,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26939,10 +26988,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26957,7 +27006,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26965,7 +27014,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -26993,8 +27042,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27003,7 +27052,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27019,8 +27068,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27065,20 +27114,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27087,7 +27136,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27097,17 +27146,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27116,8 +27165,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27142,42 +27192,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27250,15 +27302,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27266,8 +27318,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27312,12 +27363,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27368,51 +27419,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27422,23 +27475,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27450,15 +27503,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27501,7 +27554,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27523,48 +27576,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27623,11 +27676,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27636,8 +27689,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27651,16 +27704,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27670,26 +27724,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27702,7 +27756,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27717,209 +27773,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27927,79 +27990,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28007,127 +28070,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28136,74 +28199,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28212,290 +28278,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28503,184 +28570,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28688,37 +28761,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28802,7 +28875,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28865,8 +28938,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28889,7 +28962,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28899,118 +28972,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29018,51 +29091,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29071,19 +29145,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29092,80 +29165,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29174,42 +29253,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29219,21 +29298,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29241,7 +29320,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29250,7 +29329,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29259,412 +29338,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29672,7 +29756,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29680,301 +29764,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -29982,26 +30079,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34580,6 +34677,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36769,7 +36867,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46781,6 +46879,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53135,126 +53642,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53264,11 +53687,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -55980,6 +56784,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/pl.po b/weblate/pl.po index 45626cf181..d610719dbf 100644 --- a/weblate/pl.po +++ b/weblate/pl.po @@ -17,7 +17,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-09 13:43+0000\n" "Last-Translator: RM \n" "Language-Team: Polish `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "``MAX_SPEED``: Największa prędkość z jaką możemy się poruszać." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "``JUMP_SPEED``: Jak wysoko można skoczyć." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." @@ -24772,7 +24775,7 @@ msgstr "" "``ACCEL``: Jak szybko będzie przyspieszać. Wyższa wartość, zmniejszy czas do " "osiągnięcia maksymalnej prędkości." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." @@ -24780,23 +24783,23 @@ msgstr "" "``DEACCEL``: Określa jak szybko będziemy zwalniać. Większa wartość pozwoli " "szybciej zatrzymać się." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " @@ -24806,14 +24809,14 @@ msgstr "" "odpowiednia dla mojej myszy, lecz prawdopodobnie będziesz musiał dostosować " "tą wartość do siebie." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." @@ -24821,7 +24824,7 @@ msgstr "" "Być może zauważyłeś, że ``MOUSE_SENSITIVITY`` jest napisane wielkimi " "literami jak inne stałe, lecz ``MOUSE_SENSITIVITY`` nie jest stałą." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -24834,11 +24837,11 @@ msgstr "" "późniejszej zmiany wartości po dodaniu ustawień konfigurowalnych. Więc, aby " "przypomnieć sobie, aby traktować go jak stałą, to nazywa jak zwykłe stałe." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "Spójrzmy teraz na funkcję ``ready``:" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." @@ -24846,7 +24849,7 @@ msgstr "" "Najpierw wczytujemy węzły(node) ``camera`` i `rotation_helper`` i zapisujemy " "je do zmiennych." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." @@ -24854,7 +24857,7 @@ msgstr "" "Następnie musimy ustawić tryb pracy myszy tak, aby mysz nie mogła opuścić " "okna gry." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " @@ -24864,7 +24867,7 @@ msgstr "" "Pierwszym powodem jest to, że nie chcemy, aby gracz widział kursor myszy " "podczas gry." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -24876,7 +24879,7 @@ msgstr "" "poza oknem, a wtedy gra przestanie być aktywnym oknem. Aby zapewnić, że " "żaden z tych problemów nie wystąpi, przechwytujemy kursor myszy." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " @@ -24886,11 +24889,11 @@ msgstr "" "Będziemy używali jedynie ``MOUSE_MODE_CAPTURED`` i ``MOUSE_MODE_VISIBLE`` w " "tym poradniku." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "Następnie przyjrzyjmy się ``_physics_process``:" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." @@ -24898,14 +24901,14 @@ msgstr "" "Wszystko co robimy w ``process_proces`` to wywoływanie dwóch funkcji: " "``proces_input`` i ``process_movement``." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " @@ -24915,16 +24918,16 @@ msgstr "" "`KinematicBody `, dzięki temu będzie można przemierzać " "świat gry." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "Spójrzmy na ``proces_movement``:" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" "Najpierw ustawiamy ``dir`` na pusty wektor :ref:`Vector3 `." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " @@ -24935,75 +24938,75 @@ msgstr "" "następstwa dla kolejnych ``process_movement``, więc będziemy resetować " "``dir``." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -25011,13 +25014,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -25025,44 +25028,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -25070,14 +25073,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -25086,44 +25089,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -25132,27 +25136,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -25160,162 +25165,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -25323,158 +25330,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -25509,7 +25516,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -25542,7 +25549,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -25579,18 +25586,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -25638,7 +25646,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -25749,7 +25757,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -26207,7 +26215,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -26248,9 +26256,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -26289,37 +26297,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -26328,19 +26338,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -26348,26 +26358,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -26375,7 +26385,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -26384,7 +26394,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -26393,20 +26403,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -26415,66 +26425,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -26484,7 +26494,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -26492,23 +26502,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -26518,28 +26528,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -26548,21 +26558,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -26570,380 +26580,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -26951,149 +26968,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -27101,114 +27122,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -27220,519 +27257,525 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" -msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +#, fuzzy +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" +msgstr "Dodaj skrypt do ``Mob`` i dodaj do niego następujące zmienne:" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 +#, fuzzy msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" -msgstr "" +"add the following class variables:" +msgstr "Dodaj skrypt do ``Mob`` i dodaj do niego następujące zmienne:" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -27740,28 +27783,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -27771,81 +27814,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -27854,155 +27897,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -28014,9 +28064,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -28039,7 +28089,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -28103,8 +28153,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -28113,8 +28163,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -28127,7 +28177,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -28158,7 +28208,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -28166,7 +28216,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -28198,8 +28248,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -28224,7 +28274,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -28235,13 +28285,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -28250,16 +28300,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -28272,17 +28324,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -28291,16 +28342,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" -msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +#, fuzzy +msgid "Open up ``Player.gd`` and add the following class variables:" +msgstr "Dodaj skrypt do ``Mob`` i dodaj do niego następujące zmienne:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 msgid "Let's go over what each of these new variables will be doing:" @@ -28323,7 +28375,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -28331,20 +28383,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -28358,10 +28411,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -28382,8 +28435,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -28399,7 +28452,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -28447,7 +28500,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -28489,10 +28542,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -28507,7 +28560,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -28515,7 +28568,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -28543,8 +28596,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -28553,7 +28606,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -28569,8 +28622,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -28615,21 +28668,22 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" -msgstr "" +#, fuzzy +msgid "Open up ``Player.gd`` and add the following class variable:" +msgstr "Dodaj skrypt do ``Mob`` i dodaj do niego następujące zmienne:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 msgid "``MAX_HEALTH``: The maximum amount of health a player can have." @@ -28637,7 +28691,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -28647,17 +28701,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -28666,8 +28720,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -28692,42 +28747,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -28800,15 +28857,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -28816,8 +28873,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -28862,12 +28918,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -28918,51 +28974,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -28972,23 +29030,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -29000,15 +29058,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -29051,7 +29109,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -29073,48 +29131,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -29173,11 +29231,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -29185,10 +29243,13 @@ msgid "Now let's turn our attention to ``_ready``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 +#, fuzzy msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" +"Najpierw wczytujemy węzły(node) ``camera`` i `rotation_helper`` i zapisujemy " +"je do zmiennych." #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 msgid "" @@ -29201,16 +29262,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -29220,26 +29282,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -29252,7 +29314,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -29267,212 +29331,220 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 +msgid "" +"Next we check if the sticky grenade has attached to something already or not." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 +msgid "" +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 +#, fuzzy msgid "" "We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" "Następnie wykonujemy nowy węzeł :ref:`Spatial ` i robimy z " "niego dziecko, ciała z którym się zetknęliśmy. Następnie ustawiamy pozycję :" "ref:`Spatial ` na naszą aktualną pozycję." -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 -msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -29480,79 +29552,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -29560,127 +29632,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -29689,74 +29761,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -29765,290 +29840,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -30056,184 +30132,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -30241,37 +30323,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -30355,8 +30437,9 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." -msgstr "" +#, fuzzy +msgid "Let's look at the class variables first." +msgstr "Przejrzyjmy każdą ze zmiennych globalnych:" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 msgid "" @@ -30418,8 +30501,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -30442,7 +30525,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -30452,118 +30535,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -30571,51 +30654,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -30624,19 +30708,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -30645,80 +30728,87 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." -msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +#, fuzzy +msgid "Open up ``Globals.gd`` and add the following class variables:" +msgstr "Dodaj skrypt do ``Mob`` i dodaj do niego następujące zmienne:" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -30727,42 +30817,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -30772,21 +30862,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -30794,7 +30884,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -30803,7 +30893,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -30812,412 +30902,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -31225,7 +31320,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -31233,301 +31328,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -31535,26 +31643,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -36133,6 +36241,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -38377,7 +38486,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -48389,6 +48498,420 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +#, fuzzy +msgid "GDNative C++ example" +msgstr "GDNative / C++" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +#, fuzzy +msgid "Setting up your project" +msgstr "Tworzenie nowego projektu" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +#, fuzzy +msgid "Creating a simple plugin" +msgstr "Tworzenie nowego projektu" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +#, fuzzy +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" +"Zacznij od zadeklarowania zmiennych, których ten obiekt będzie potrzebował:" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -54744,126 +55267,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -54873,11 +55312,394 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Konfiguracja węzła" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +#, fuzzy +msgid "imported" +msgstr "Importer CSV" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -57666,6 +58488,10 @@ msgstr "" "`HeartBeast `_" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/pt_BR.po b/weblate/pt_BR.po index 7045490b67..19725c2b6f 100644 --- a/weblate/pt_BR.po +++ b/weblate/pt_BR.po @@ -36,7 +36,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-13 11:53+0000\n" "Last-Translator: Rodolfo R Gomes \n" "Language-Team: Portuguese (Brazil) `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -27216,30 +27219,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -27247,122 +27250,122 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" "Primeiro, definimos ``dir`` como um :ref:`Vector3 ` vazio." -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -27370,13 +27373,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -27384,44 +27387,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -27429,14 +27432,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -27445,44 +27448,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -27491,27 +27495,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -27519,162 +27524,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -27682,158 +27689,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -27868,7 +27875,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -27901,7 +27908,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -27938,18 +27945,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -27997,7 +28005,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -28108,7 +28116,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -28572,7 +28580,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -28613,9 +28621,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -28654,37 +28662,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -28693,19 +28703,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -28713,26 +28723,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -28740,7 +28750,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -28749,7 +28759,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -28758,20 +28768,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -28780,66 +28790,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -28849,7 +28859,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -28857,23 +28867,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -28883,28 +28893,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -28913,21 +28923,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -28935,380 +28945,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -29316,151 +29333,156 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 +#, fuzzy msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" "Primeiro, verificamos se estamos trocando de armas ou não. Se nós estamos " "trocando de armas, nós não queremos atirar, então nós ``return``." -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -29468,114 +29490,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -29587,519 +29625,529 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +#, fuzzy +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" +"Adicione um roteiro ao nó ``Turba`` e adicione as seguintes variáveis " +"membros:" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 +#, fuzzy msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" +"Adicione um roteiro ao nó ``Turba`` e adicione as seguintes variáveis " +"membros:" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -30107,28 +30155,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -30138,81 +30186,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -30221,155 +30269,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -30381,9 +30436,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -30406,7 +30461,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -30470,8 +30525,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -30480,8 +30535,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -30494,7 +30549,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -30525,7 +30580,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -30533,7 +30588,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -30565,8 +30620,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -30591,7 +30646,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -30602,13 +30657,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -30617,16 +30672,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -30639,17 +30696,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -30658,16 +30714,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +#, fuzzy +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" +"Adicione um roteiro ao nó ``Turba`` e adicione as seguintes variáveis " +"membros:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 msgid "Let's go over what each of these new variables will be doing:" @@ -30690,7 +30749,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -30698,20 +30757,22 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 +#, fuzzy msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" "Em seguida, verificamos se estamos trocando de armas ou recarregando. Se não " "estivermos fazendo nenhum dos dois, arredondamos ``mouse_scroll_value`` e " @@ -30728,10 +30789,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -30752,8 +30813,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -30769,7 +30830,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -30817,7 +30878,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -30859,10 +30920,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -30877,7 +30938,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -30885,7 +30946,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -30913,8 +30974,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -30923,7 +30984,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -30939,8 +31000,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -30985,21 +31046,24 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +#, fuzzy +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" +"Adicione um roteiro ao nó ``Turba`` e adicione as seguintes variáveis " +"membros:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 msgid "``MAX_HEALTH``: The maximum amount of health a player can have." @@ -31007,7 +31071,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -31017,17 +31081,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -31036,8 +31100,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -31062,42 +31127,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -31170,15 +31237,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -31186,8 +31253,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -31232,12 +31298,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -31288,51 +31354,54 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." -msgstr "" +#, fuzzy +msgid "In this case, we want to respawn the target." +msgstr "Neste caso, traduz para:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -31342,23 +31411,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -31370,15 +31439,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -31421,7 +31490,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -31443,48 +31512,48 @@ msgstr "Adicionando granadas" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -31543,11 +31612,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -31556,8 +31625,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -31571,16 +31640,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -31590,26 +31660,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -31622,7 +31692,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -31637,209 +31709,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -31847,79 +31926,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -31927,114 +32006,117 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 +#, fuzzy msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" +"Adicionar a habilidade de agarrar e arremessar nós :ref:`RigidBody " +"`" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " @@ -32045,13 +32127,13 @@ msgstr "" "partir do código, ao invés de ter que usar um nó: ref: `Raycast " "`." -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -32060,74 +32142,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -32136,290 +32221,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "Adicionando uma torre" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -32427,184 +32513,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -32612,37 +32704,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -32726,7 +32818,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -32789,8 +32881,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -32813,7 +32905,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -32823,118 +32915,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -32942,51 +33034,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -32995,19 +33088,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -33016,84 +33108,94 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 +#, fuzzy msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" "Em ``_process`` nós definimos o texto do ``FPS_Label`` para ``Engine." "get_frames_per_second``, mas como ``get_frames_per_second`` retorna um " "inteiro, nós temos que convertê-lo em uma string usando ``str`` antes que " "possamos adicioná-lo ao nosso rótulo." -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +#, fuzzy +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" +"Adicione um roteiro ao nó ``Turba`` e adicione as seguintes variáveis " +"membros:" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -33102,42 +33204,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -33147,21 +33249,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -33169,7 +33271,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -33178,7 +33280,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -33187,412 +33289,418 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." -msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +#, fuzzy +msgid "Now all of the weapons will reset when the player dies." +msgstr "Clareia a barra quando o jogador morre" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -33600,7 +33708,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -33608,301 +33716,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -33910,26 +34031,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -38524,6 +38645,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Animação" @@ -40720,7 +40842,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -50734,6 +50856,420 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +#, fuzzy +msgid "GDNative C++ example" +msgstr "GDNative / C++" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +#, fuzzy +msgid "Setting up your project" +msgstr "Criando um novo projeto" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +#, fuzzy +msgid "There are a few prerequisites you'll need:" +msgstr "Existem algumas diferenças:" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +#, fuzzy +msgid "Creating a simple plugin" +msgstr "Criando um script C#" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +#, fuzzy +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "Comece declarando as variáveis membro que este objeto irá precisar:" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -57092,126 +57628,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -57221,11 +57673,402 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Caminho do Recurso" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +#, fuzzy +msgid "Skeleton" +msgstr "Singletons" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Animação" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +#, fuzzy +msgid "ArrayMesh" +msgstr "Arrays" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +#, fuzzy +msgid "arrays" +msgstr "Arrays" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +#, fuzzy +msgid "path" +msgstr "Caminho do usuário" + +#: ../../docs/development/file_formats/tscn.rst:380 +#, fuzzy +msgid "interp" +msgstr "Center" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Transformação" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Valor" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "A constante PI." + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -59940,6 +60783,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/pt_PT.po b/weblate/pt_PT.po index 71687d7817..1dd24008ed 100644 --- a/weblate/pt_PT.po +++ b/weblate/pt_PT.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-12 10:42+0000\n" "Last-Translator: Alexandre Badalo \n" "Language-Team: Portuguese (Portugal) `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23378,30 +23380,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23409,121 +23411,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23531,13 +23533,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23545,44 +23547,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23590,14 +23592,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23606,44 +23608,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23652,27 +23655,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23680,162 +23684,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23843,158 +23849,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24029,7 +24035,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24062,7 +24068,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24099,18 +24105,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24158,7 +24165,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24269,7 +24276,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24727,7 +24734,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24768,9 +24775,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24809,37 +24816,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24848,19 +24857,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24868,26 +24877,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24895,7 +24904,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24904,7 +24913,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24913,20 +24922,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24935,66 +24944,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25004,7 +25013,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25012,23 +25021,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25038,28 +25047,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25068,21 +25077,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25090,380 +25099,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25471,149 +25487,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25621,114 +25641,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25740,519 +25776,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26260,28 +26300,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26291,81 +26331,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26374,155 +26414,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26534,9 +26581,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26559,7 +26606,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26623,8 +26670,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26633,8 +26680,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26647,7 +26694,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26678,7 +26725,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26686,7 +26733,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26718,8 +26765,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26744,7 +26791,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26755,13 +26802,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26770,16 +26817,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26792,17 +26841,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26811,15 +26859,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26843,7 +26891,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26851,20 +26899,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26878,10 +26927,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26902,8 +26951,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26919,7 +26968,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26967,7 +27016,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27009,10 +27058,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27027,7 +27076,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27035,7 +27084,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27063,8 +27112,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27073,7 +27122,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27089,8 +27138,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27135,20 +27184,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27157,7 +27206,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27167,17 +27216,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27186,8 +27235,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27212,42 +27262,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27320,15 +27372,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27336,8 +27388,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27382,12 +27433,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27438,51 +27489,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27492,23 +27545,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27520,15 +27573,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27571,7 +27624,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27593,48 +27646,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27693,11 +27746,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27706,8 +27759,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27721,16 +27774,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27740,26 +27794,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27772,7 +27826,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27787,209 +27843,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27997,79 +28060,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28077,127 +28140,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28206,74 +28269,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28282,290 +28348,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28573,184 +28640,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28758,37 +28831,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28872,7 +28945,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28935,8 +29008,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28959,7 +29032,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28969,118 +29042,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29088,51 +29161,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29141,19 +29215,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29162,80 +29235,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29244,42 +29323,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29289,21 +29368,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29311,7 +29390,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29320,7 +29399,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29329,412 +29408,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29742,7 +29826,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29750,301 +29834,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30052,26 +30149,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34650,6 +34747,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Animação" @@ -36839,7 +36937,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46851,6 +46949,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53207,126 +53714,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "grupos" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53336,11 +53759,397 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Caminho do recurso" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Animação" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Transformar" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Valor" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Constantes" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56057,6 +56866,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/ru.po b/weblate/ru.po index b5f4bb2d5f..bf33d19860 100644 --- a/weblate/ru.po +++ b/weblate/ru.po @@ -25,7 +25,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-13 11:53+0000\n" "Last-Translator: Forest Swamp \n" "Language-Team: Russian `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -24626,30 +24628,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -24657,121 +24659,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -24779,13 +24781,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -24793,44 +24795,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -24838,14 +24840,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -24854,44 +24856,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -24900,27 +24903,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -24928,162 +24932,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -25091,158 +25097,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -25277,7 +25283,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -25310,7 +25316,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -25347,18 +25353,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -25406,7 +25413,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -25517,7 +25524,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -25975,7 +25982,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -26016,9 +26023,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -26057,37 +26064,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -26096,19 +26105,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -26116,26 +26125,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -26143,7 +26152,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -26152,7 +26161,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -26161,20 +26170,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -26183,66 +26192,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -26252,7 +26261,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -26260,23 +26269,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -26286,28 +26295,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -26316,21 +26325,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -26338,380 +26347,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -26719,149 +26735,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -26869,114 +26889,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -26988,519 +27024,525 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" -msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +#, fuzzy +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" +msgstr "Прикрепите скрипт к ``Mob`` и добавьте следующие переменные:" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 +#, fuzzy msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" -msgstr "" +"add the following class variables:" +msgstr "Прикрепите скрипт к ``Mob`` и добавьте следующие переменные:" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -27508,28 +27550,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -27539,81 +27581,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -27622,155 +27664,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -27782,9 +27831,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -27807,7 +27856,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -27871,8 +27920,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -27881,8 +27930,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -27895,7 +27944,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -27926,7 +27975,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -27934,7 +27983,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -27966,8 +28015,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -27992,7 +28041,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -28003,13 +28052,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -28018,16 +28067,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -28040,17 +28091,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -28059,16 +28109,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" -msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +#, fuzzy +msgid "Open up ``Player.gd`` and add the following class variables:" +msgstr "Прикрепите скрипт к ``Mob`` и добавьте следующие переменные:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 msgid "Let's go over what each of these new variables will be doing:" @@ -28091,7 +28142,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -28099,20 +28150,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -28126,10 +28178,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -28150,8 +28202,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -28167,7 +28219,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -28215,7 +28267,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -28257,10 +28309,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -28275,7 +28327,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -28283,7 +28335,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -28311,8 +28363,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -28321,7 +28373,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -28337,8 +28389,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -28383,21 +28435,22 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" -msgstr "" +#, fuzzy +msgid "Open up ``Player.gd`` and add the following class variable:" +msgstr "Прикрепите скрипт к ``Mob`` и добавьте следующие переменные:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 msgid "``MAX_HEALTH``: The maximum amount of health a player can have." @@ -28405,7 +28458,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -28415,17 +28468,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -28434,8 +28487,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -28460,42 +28514,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -28568,15 +28624,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -28584,8 +28640,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -28630,12 +28685,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -28686,51 +28741,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -28740,23 +28797,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -28768,15 +28825,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -28819,7 +28876,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -28841,48 +28898,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -28941,11 +28998,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -28954,8 +29011,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -28969,16 +29026,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -28988,26 +29046,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -29020,7 +29078,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -29035,209 +29095,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -29245,79 +29312,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -29325,127 +29392,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -29454,74 +29521,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -29530,290 +29600,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -29821,184 +29892,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -30006,37 +30083,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -30120,7 +30197,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -30183,8 +30260,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -30207,7 +30284,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -30217,118 +30294,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -30336,51 +30413,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -30389,19 +30467,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -30410,80 +30487,87 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." -msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +#, fuzzy +msgid "Open up ``Globals.gd`` and add the following class variables:" +msgstr "Прикрепите скрипт к ``Mob`` и добавьте следующие переменные:" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -30492,42 +30576,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -30537,21 +30621,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -30559,7 +30643,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -30568,7 +30652,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -30577,412 +30661,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -30990,7 +31079,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -30998,301 +31087,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -31300,26 +31402,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -35898,6 +36000,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Анимация" @@ -38087,7 +38190,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -48106,6 +48209,419 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +#, fuzzy +msgid "GDNative C++ example" +msgstr "GDNative / C++" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +#, fuzzy +msgid "Setting up your project" +msgstr "Создание нового проекта" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +#, fuzzy +msgid "Creating a simple plugin" +msgstr "Создание нового проекта" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +#, fuzzy +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "Чтобы начать объявлять переменные объекта понадобится:" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -54462,126 +54978,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -54591,11 +55023,399 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Путь ресурса" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Анимация" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +#, fuzzy +msgid "ArrayMesh" +msgstr "Массив" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +#, fuzzy +msgid "arrays" +msgstr "Массив" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Преобразование" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Значение" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Константа Пи." + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -57312,6 +58132,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/sl.po b/weblate/sl.po index ffa8aa9d84..7f07101797 100644 --- a/weblate/sl.po +++ b/weblate/sl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-07 14:44+0000\n" "Last-Translator: matevž lapajne \n" "Language-Team: Slovenian `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23471,30 +23473,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23502,121 +23504,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23624,13 +23626,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23638,44 +23640,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23683,14 +23685,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23699,44 +23701,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23745,27 +23748,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23773,162 +23777,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23936,158 +23942,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24122,7 +24128,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24155,7 +24161,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24192,18 +24198,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24251,7 +24258,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24362,7 +24369,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24820,7 +24827,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24861,9 +24868,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24902,37 +24909,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24941,19 +24950,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24961,26 +24970,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24988,7 +24997,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24997,7 +25006,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -25006,20 +25015,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -25028,66 +25037,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25097,7 +25106,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25105,23 +25114,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25131,28 +25140,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25161,21 +25170,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25183,380 +25192,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25564,149 +25580,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25714,114 +25734,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25833,519 +25869,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26353,28 +26393,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26384,81 +26424,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26467,155 +26507,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26627,9 +26674,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26652,7 +26699,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26716,8 +26763,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26726,8 +26773,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26740,7 +26787,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26771,7 +26818,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26779,7 +26826,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26811,8 +26858,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26837,7 +26884,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26848,13 +26895,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26863,16 +26910,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26885,17 +26934,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26904,15 +26952,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26936,7 +26984,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26944,20 +26992,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26971,10 +27020,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26995,8 +27044,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -27012,7 +27061,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27060,7 +27109,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27102,10 +27151,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27120,7 +27169,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27128,7 +27177,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27156,8 +27205,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27166,7 +27215,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27182,8 +27231,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27228,20 +27277,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27250,7 +27299,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27260,17 +27309,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27279,8 +27328,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27305,42 +27355,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27413,15 +27465,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27429,8 +27481,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27475,12 +27526,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27531,51 +27582,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27585,23 +27638,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27613,15 +27666,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27664,7 +27717,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27686,48 +27739,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27786,11 +27839,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27799,8 +27852,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27814,16 +27867,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27833,26 +27887,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27865,7 +27919,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27880,209 +27936,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28090,79 +28153,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28170,127 +28233,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28299,74 +28362,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28375,290 +28441,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28666,184 +28733,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28851,37 +28924,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28965,7 +29038,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -29028,8 +29101,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -29052,7 +29125,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29062,118 +29135,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29181,51 +29254,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29234,19 +29308,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29255,80 +29328,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29337,42 +29416,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29382,21 +29461,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29404,7 +29483,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29413,7 +29492,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29422,412 +29501,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29835,7 +29919,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29843,301 +29927,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30145,26 +30242,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34743,6 +34840,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Animacija" @@ -36932,7 +37030,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46944,6 +47042,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53298,126 +53805,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53427,11 +53850,396 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Pot" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Animacija" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Preoblikovanje" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Konstante" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56147,6 +56955,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/sr_Latn.po b/weblate/sr_Latn.po index a38e45b38c..e084fdafc1 100644 --- a/weblate/sr_Latn.po +++ b/weblate/sr_Latn.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-05-15 08:41+0000\n" "Last-Translator: Milos Ponjavusic \n" "Language-Team: Serbian (latin) `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23397,30 +23399,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23428,121 +23430,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23550,13 +23552,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23564,44 +23566,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23609,14 +23611,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23625,44 +23627,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23671,27 +23674,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23699,162 +23703,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23862,158 +23868,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24048,7 +24054,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24081,7 +24087,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24118,18 +24124,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24177,7 +24184,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24288,7 +24295,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24746,7 +24753,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24787,9 +24794,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24828,37 +24835,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24867,19 +24876,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24887,26 +24896,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24914,7 +24923,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24923,7 +24932,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24932,20 +24941,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24954,66 +24963,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25023,7 +25032,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25031,23 +25040,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25057,28 +25066,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25087,21 +25096,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25109,380 +25118,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25490,149 +25506,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25640,114 +25660,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25759,519 +25795,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26279,28 +26319,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26310,81 +26350,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26393,155 +26433,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26553,9 +26600,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26578,7 +26625,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26642,8 +26689,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26652,8 +26699,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26666,7 +26713,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26697,7 +26744,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26705,7 +26752,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26737,8 +26784,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26763,7 +26810,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26774,13 +26821,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26789,16 +26836,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26811,17 +26860,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26830,15 +26878,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26862,7 +26910,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26870,20 +26918,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26897,10 +26946,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26921,8 +26970,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26938,7 +26987,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26986,7 +27035,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27028,10 +27077,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27046,7 +27095,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27054,7 +27103,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27082,8 +27131,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27092,7 +27141,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27108,8 +27157,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27154,20 +27203,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27176,7 +27225,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27186,17 +27235,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27205,8 +27254,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27231,42 +27281,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27339,15 +27391,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27355,8 +27407,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27401,12 +27452,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27457,51 +27508,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27511,23 +27564,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27539,15 +27592,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27590,7 +27643,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27612,48 +27665,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27712,11 +27765,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27725,8 +27778,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27740,16 +27793,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27759,26 +27813,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27791,7 +27845,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27806,209 +27862,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28016,79 +28079,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28096,127 +28159,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28225,74 +28288,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28301,290 +28367,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28592,184 +28659,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28777,37 +28850,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28891,7 +28964,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28954,8 +29027,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28978,7 +29051,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28988,118 +29061,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29107,51 +29180,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29160,19 +29234,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29181,80 +29254,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29263,42 +29342,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29308,21 +29387,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29330,7 +29409,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29339,7 +29418,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29348,412 +29427,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29761,7 +29845,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29769,301 +29853,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30071,26 +30168,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34669,6 +34766,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36858,7 +36956,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46870,6 +46968,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53224,126 +53731,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53353,11 +53776,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56073,6 +56877,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/sv.po b/weblate/sv.po index 2ea25827c0..caf5af4d48 100644 --- a/weblate/sv.po +++ b/weblate/sv.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-12 18:44+0000\n" "Last-Translator: Tobias Björkdahl \n" "Language-Team: Swedish `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23308,30 +23310,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23339,121 +23341,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23461,13 +23463,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23475,44 +23477,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23520,14 +23522,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23536,44 +23538,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23582,27 +23585,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23610,162 +23614,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23773,158 +23779,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -23959,7 +23965,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -23992,7 +23998,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24029,18 +24035,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24088,7 +24095,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24199,7 +24206,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24657,7 +24664,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24698,9 +24705,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24739,37 +24746,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24778,19 +24787,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24798,26 +24807,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24825,7 +24834,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24834,7 +24843,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24843,20 +24852,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24865,66 +24874,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24934,7 +24943,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24942,23 +24951,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -24968,28 +24977,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -24998,21 +25007,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25020,380 +25029,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25401,149 +25417,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25551,114 +25571,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25670,519 +25706,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26190,28 +26230,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26221,81 +26261,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26304,155 +26344,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26464,9 +26511,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26489,7 +26536,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26553,8 +26600,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26563,8 +26610,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26577,7 +26624,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26608,7 +26655,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26616,7 +26663,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26648,8 +26695,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26674,7 +26721,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26685,13 +26732,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26700,16 +26747,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26722,17 +26771,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26741,15 +26789,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26773,7 +26821,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26781,20 +26829,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26808,10 +26857,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26832,8 +26881,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26849,7 +26898,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26897,7 +26946,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26939,10 +26988,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -26957,7 +27006,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -26965,7 +27014,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -26993,8 +27042,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27003,7 +27052,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27019,8 +27068,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27065,20 +27114,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27087,7 +27136,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27097,17 +27146,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27116,8 +27165,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27142,42 +27192,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27250,15 +27302,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27266,8 +27318,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27312,12 +27363,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27368,51 +27419,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27422,23 +27475,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27450,15 +27503,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27501,7 +27554,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27523,48 +27576,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27623,11 +27676,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27636,8 +27689,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27651,16 +27704,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27670,26 +27724,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27702,7 +27756,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27717,209 +27773,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27927,79 +27990,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28007,127 +28070,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28136,74 +28199,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28212,290 +28278,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28503,184 +28570,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28688,37 +28761,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28802,7 +28875,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28865,8 +28938,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28889,7 +28962,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28899,118 +28972,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29018,51 +29091,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29071,19 +29145,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29092,80 +29165,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29174,42 +29253,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29219,21 +29298,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29241,7 +29320,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29250,7 +29329,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29259,412 +29338,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29672,7 +29756,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29680,301 +29764,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -29982,26 +30079,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34580,6 +34677,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36769,7 +36867,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46781,6 +46879,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53135,126 +53642,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53264,11 +53687,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -55980,6 +56784,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/th.po b/weblate/th.po index 978d92f64b..c6c21948be 100644 --- a/weblate/th.po +++ b/weblate/th.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-04-17 12:41+0000\n" "Last-Translator: Poommetee Ketson \n" "Language-Team: Thai `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23527,30 +23529,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23558,121 +23560,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23680,13 +23682,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23694,44 +23696,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23739,14 +23741,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23755,44 +23757,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23801,27 +23804,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23829,162 +23833,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23992,158 +23998,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24178,7 +24184,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24211,7 +24217,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24248,18 +24254,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24307,7 +24314,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24418,7 +24425,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24876,7 +24883,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24917,9 +24924,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24958,37 +24965,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24997,19 +25006,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -25017,26 +25026,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -25044,7 +25053,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -25053,7 +25062,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -25062,20 +25071,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -25084,66 +25093,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25153,7 +25162,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25161,23 +25170,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25187,28 +25196,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25217,21 +25226,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25239,380 +25248,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25620,149 +25636,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25770,114 +25790,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25889,519 +25925,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26409,28 +26449,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26440,81 +26480,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26523,155 +26563,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26683,9 +26730,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26708,7 +26755,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26772,8 +26819,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26782,8 +26829,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26796,7 +26843,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26827,7 +26874,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26835,7 +26882,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26867,8 +26914,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26893,7 +26940,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26904,13 +26951,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26919,16 +26966,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26941,17 +26990,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26960,15 +27008,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26992,7 +27040,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -27000,20 +27048,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -27027,10 +27076,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -27051,8 +27100,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -27068,7 +27117,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27116,7 +27165,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27158,10 +27207,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27176,7 +27225,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27184,7 +27233,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27212,8 +27261,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27222,7 +27271,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27238,8 +27287,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27284,20 +27333,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27306,7 +27355,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27316,17 +27365,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27335,8 +27384,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27361,42 +27411,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27469,15 +27521,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27485,8 +27537,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27531,12 +27582,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27587,51 +27638,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27641,23 +27694,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27669,15 +27722,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27720,7 +27773,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27742,48 +27795,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27842,11 +27895,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27855,8 +27908,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27870,16 +27923,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27889,26 +27943,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27921,7 +27975,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27936,209 +27992,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28146,79 +28209,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28226,127 +28289,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28355,74 +28418,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28431,290 +28497,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28722,184 +28789,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28907,37 +28980,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -29021,7 +29094,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -29084,8 +29157,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -29108,7 +29181,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29118,118 +29191,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29237,51 +29310,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29290,19 +29364,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29311,80 +29384,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29393,42 +29472,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29438,21 +29517,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29460,7 +29539,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29469,7 +29548,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29478,412 +29557,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29891,7 +29975,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29899,301 +29983,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30201,26 +30298,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34799,6 +34896,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36988,7 +37086,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -47000,6 +47098,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53357,126 +53864,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53486,11 +53909,394 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "ตำแหน่งรีซอร์ส" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "ค่าคงที่" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56206,6 +57012,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/tr.po b/weblate/tr.po index 98a72684cb..7abe558e7b 100644 --- a/weblate/tr.po +++ b/weblate/tr.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-08 08:47+0000\n" "Last-Translator: Tuna Soncul \n" "Language-Team: Turkish `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23358,30 +23360,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23389,121 +23391,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23511,13 +23513,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23525,44 +23527,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23570,14 +23572,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23586,44 +23588,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23632,27 +23635,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23660,162 +23664,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23823,158 +23829,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24009,7 +24015,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24042,7 +24048,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24079,18 +24085,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24138,7 +24145,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24249,7 +24256,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24707,7 +24714,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24748,9 +24755,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24789,37 +24796,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24828,19 +24837,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24848,26 +24857,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24875,7 +24884,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24884,7 +24893,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24893,20 +24902,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24915,66 +24924,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24984,7 +24993,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -24992,23 +25001,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25018,28 +25027,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25048,21 +25057,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25070,380 +25079,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25451,149 +25467,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25601,114 +25621,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25720,519 +25756,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26240,28 +26280,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26271,81 +26311,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26354,155 +26394,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26514,9 +26561,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26539,7 +26586,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26603,8 +26650,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26613,8 +26660,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26627,7 +26674,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26658,7 +26705,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26666,7 +26713,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26698,8 +26745,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26724,7 +26771,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26735,13 +26782,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26750,16 +26797,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26772,17 +26821,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26791,15 +26839,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26823,7 +26871,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26831,20 +26879,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26858,10 +26907,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26882,8 +26931,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26899,7 +26948,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26947,7 +26996,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26989,10 +27038,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27007,7 +27056,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27015,7 +27064,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27043,8 +27092,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27053,7 +27102,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27069,8 +27118,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27115,20 +27164,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27137,7 +27186,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27147,17 +27196,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27166,8 +27215,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27192,42 +27242,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27300,15 +27352,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27316,8 +27368,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27362,12 +27413,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27418,51 +27469,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27472,23 +27525,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27500,15 +27553,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27551,7 +27604,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27573,48 +27626,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27673,11 +27726,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27686,8 +27739,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27701,16 +27754,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27720,26 +27774,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27752,7 +27806,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27767,209 +27823,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27977,79 +28040,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28057,127 +28120,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28186,74 +28249,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28262,290 +28328,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28553,184 +28620,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28738,37 +28811,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28852,7 +28925,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28915,8 +28988,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28939,7 +29012,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28949,118 +29022,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29068,51 +29141,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29121,19 +29195,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29142,80 +29215,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29224,42 +29303,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29269,21 +29348,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29291,7 +29370,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29300,7 +29379,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29309,412 +29388,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29722,7 +29806,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29730,301 +29814,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30032,26 +30129,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34630,6 +34727,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Animasyon" @@ -36820,7 +36918,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46832,6 +46930,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53188,126 +53695,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53317,11 +53740,397 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Kaynak Yolu" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Animasyon" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Dönüşüm" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Değer" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Sabitler" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56033,6 +56842,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/uk.po b/weblate/uk.po index d7f04ad173..bc3c98c3cc 100644 --- a/weblate/uk.po +++ b/weblate/uk.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Ukrainian (Godot Engine)\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-13 11:53+0000\n" "Last-Translator: Максим Якимчук \n" "Language-Team: Ukrainian `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23549,30 +23551,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23580,121 +23582,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23702,13 +23704,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23716,44 +23718,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23761,14 +23763,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23777,44 +23779,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23823,27 +23826,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23851,162 +23855,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -24014,158 +24020,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24200,7 +24206,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24233,7 +24239,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24270,18 +24276,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24329,7 +24336,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24440,7 +24447,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24898,7 +24905,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24939,9 +24946,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24980,37 +24987,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -25019,19 +25028,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -25039,26 +25048,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -25066,7 +25075,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -25075,7 +25084,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -25084,20 +25093,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -25106,66 +25115,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25175,7 +25184,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25183,23 +25192,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25209,28 +25218,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25239,21 +25248,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25261,380 +25270,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25642,149 +25658,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25792,114 +25812,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25911,519 +25947,523 @@ msgstr "Частина" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26431,28 +26471,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26462,81 +26502,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26545,155 +26585,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26705,9 +26752,9 @@ msgstr "Частина" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26730,7 +26777,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26794,8 +26841,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26804,8 +26851,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26818,7 +26865,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26849,7 +26896,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26857,7 +26904,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26889,8 +26936,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26915,7 +26962,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26926,13 +26973,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26941,16 +26988,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26963,17 +27012,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26982,15 +27030,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -27014,7 +27062,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -27022,20 +27070,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -27049,10 +27098,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -27073,8 +27122,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -27090,7 +27139,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27138,7 +27187,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27180,10 +27229,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27198,7 +27247,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27206,7 +27255,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27234,8 +27283,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27244,7 +27293,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27260,8 +27309,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27306,20 +27355,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27328,7 +27377,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27338,17 +27387,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27357,8 +27406,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27383,42 +27433,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27491,15 +27543,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27507,8 +27559,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27553,12 +27604,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27609,51 +27660,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27663,23 +27716,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27691,15 +27744,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27742,7 +27795,7 @@ msgstr "Частина 5" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27764,48 +27817,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27864,11 +27917,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27877,8 +27930,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27892,16 +27945,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27911,26 +27965,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27943,7 +27997,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27958,209 +28014,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28168,79 +28231,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28248,127 +28311,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28377,74 +28440,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28453,290 +28519,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28744,184 +28811,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28929,37 +29002,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -29043,7 +29116,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -29106,8 +29179,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -29130,7 +29203,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29140,118 +29213,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29259,51 +29332,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29312,19 +29386,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29333,80 +29406,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29415,42 +29494,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29460,21 +29539,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29482,7 +29561,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29491,7 +29570,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29500,412 +29579,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "Запускаємо систему повернення гравця" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29913,7 +29997,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29921,301 +30005,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30223,26 +30320,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34821,6 +34918,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "Анімація" @@ -37010,7 +37108,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -47022,6 +47120,419 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +#, fuzzy +msgid "Setting up your project" +msgstr "Як створити проект" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +#, fuzzy +msgid "Creating a simple plugin" +msgstr "Як створити проект" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +#, fuzzy +msgid "Compiling our plugin" +msgstr "Компілювання" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +#, fuzzy +msgid "Using your GDNative module" +msgstr "Користування модулем" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53381,126 +53892,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "Екземпляр" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "instance_placeholder" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "власник" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53510,11 +53937,403 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "Шлях до ресурсу" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +#, fuzzy +msgid "name" +msgstr "Назва" + +#: ../../docs/development/file_formats/tscn.rst:160 +#, fuzzy +msgid "parent" +msgstr "Прозорий" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "Анімація" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +#, fuzzy +msgid "primitive" +msgstr "Обмежувач" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +#, fuzzy +msgid "length" +msgstr "Довжина" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +#, fuzzy +msgid "interp" +msgstr "Center" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +#, fuzzy +msgid "imported" +msgstr "Демонстраційне вікно" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "Перетворення" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "Значення" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "Стала π." + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56230,6 +57049,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/vi.po b/weblate/vi.po index e4d2b13142..5ef9204663 100644 --- a/weblate/vi.po +++ b/weblate/vi.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-05-17 02:42+0000\n" "Last-Translator: mth2610 \n" "Language-Team: Vietnamese `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23367,30 +23369,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23398,121 +23400,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23520,13 +23522,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23534,44 +23536,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23579,14 +23581,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23595,44 +23597,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23641,27 +23644,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23669,162 +23673,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23832,158 +23838,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24018,7 +24024,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24051,7 +24057,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24088,18 +24094,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24147,7 +24154,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24258,7 +24265,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24716,7 +24723,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24757,9 +24764,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24798,37 +24805,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24837,19 +24846,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24857,26 +24866,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24884,7 +24893,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24893,7 +24902,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24902,20 +24911,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24924,66 +24933,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -24993,7 +25002,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25001,23 +25010,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25027,28 +25036,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25057,21 +25066,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25079,380 +25088,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25460,149 +25476,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25610,114 +25630,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25729,519 +25765,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26249,28 +26289,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26280,81 +26320,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26363,155 +26403,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26523,9 +26570,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26548,7 +26595,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26612,8 +26659,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26622,8 +26669,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26636,7 +26683,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26667,7 +26714,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26675,7 +26722,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26707,8 +26754,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26733,7 +26780,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26744,13 +26791,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26759,16 +26806,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26781,17 +26830,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26800,15 +26848,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26832,7 +26880,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26840,20 +26888,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26867,10 +26916,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26891,8 +26940,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26908,7 +26957,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -26956,7 +27005,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -26998,10 +27047,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27016,7 +27065,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27024,7 +27073,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27052,8 +27101,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27062,7 +27111,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27078,8 +27127,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27124,20 +27173,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27146,7 +27195,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27156,17 +27205,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27175,8 +27224,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27201,42 +27251,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27309,15 +27361,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27325,8 +27377,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27371,12 +27422,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27427,51 +27478,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27481,23 +27534,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27509,15 +27562,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27560,7 +27613,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27582,48 +27635,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27682,11 +27735,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27695,8 +27748,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27710,16 +27763,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27729,26 +27783,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27761,7 +27815,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27776,209 +27832,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -27986,79 +28049,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28066,127 +28129,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28195,74 +28258,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28271,290 +28337,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28562,184 +28629,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28747,37 +28820,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28861,7 +28934,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28924,8 +28997,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28948,7 +29021,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -28958,118 +29031,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29077,51 +29150,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29130,19 +29204,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29151,80 +29224,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29233,42 +29312,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29278,21 +29357,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29300,7 +29379,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29309,7 +29388,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29318,412 +29397,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29731,7 +29815,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29739,301 +29823,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30041,26 +30138,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34639,6 +34736,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36828,7 +36926,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46840,6 +46938,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53194,126 +53701,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53323,11 +53746,392 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +msgid "Node Path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +msgid "'value'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56043,6 +56847,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/zh_CN.po b/weblate/zh_CN.po index 05acf65aaa..5c1c806679 100644 --- a/weblate/zh_CN.po +++ b/weblate/zh_CN.po @@ -25,7 +25,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-06-10 15:37+0000\n" "Last-Translator: bladesero <872461916@qq.com>\n" "Language-Team: Chinese (Simplified) `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -24396,30 +24398,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -24427,121 +24429,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -24549,13 +24551,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -24563,44 +24565,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -24608,14 +24610,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -24624,44 +24626,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -24670,27 +24673,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -24698,162 +24702,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -24861,158 +24867,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -25047,7 +25053,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -25080,7 +25086,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -25117,18 +25123,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -25176,7 +25183,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -25287,7 +25294,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -25745,7 +25752,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -25786,9 +25793,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -25827,37 +25834,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -25866,19 +25875,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -25886,26 +25895,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -25913,7 +25922,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -25922,7 +25931,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -25931,20 +25940,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -25953,66 +25962,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -26022,7 +26031,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -26030,23 +26039,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -26056,28 +26065,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -26086,21 +26095,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -26108,380 +26117,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -26489,150 +26505,154 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 #, fuzzy msgid "Add the following code:" msgstr "添加下面这些头文件(导入)目录:" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -26640,114 +26660,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -26759,521 +26795,525 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 #, fuzzy -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" msgstr "在你的 ``config.py`` 脚本中添加下面的代码片段:" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 msgid "" "And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " "sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 #, fuzzy msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "在你的 ``config.py`` 脚本中添加下面的代码片段:" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -27281,28 +27321,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -27312,81 +27352,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -27395,155 +27435,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -27555,9 +27602,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -27580,7 +27627,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -27644,8 +27691,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -27654,8 +27701,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -27668,7 +27715,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -27699,7 +27746,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -27707,7 +27754,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -27739,8 +27786,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -27765,7 +27812,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -27776,13 +27823,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -27791,16 +27838,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -27813,17 +27862,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -27832,15 +27880,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -27864,7 +27912,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -27872,20 +27920,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -27899,10 +27948,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -27923,8 +27972,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -27940,7 +27989,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27988,7 +28037,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -28030,10 +28079,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -28048,7 +28097,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -28056,7 +28105,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -28084,8 +28133,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -28094,7 +28143,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -28110,8 +28159,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -28156,20 +28205,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -28178,7 +28227,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -28188,17 +28237,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -28207,8 +28256,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -28233,42 +28283,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -28341,15 +28393,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -28358,8 +28410,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "在你的 ``config.py`` 脚本中添加下面的代码片段:" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -28404,12 +28455,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -28460,51 +28511,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -28514,23 +28567,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -28542,15 +28595,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -28593,7 +28646,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -28616,48 +28669,48 @@ msgstr "添加脚本" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -28716,11 +28769,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -28729,8 +28782,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -28744,16 +28797,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -28763,26 +28817,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -28795,7 +28849,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -28810,209 +28866,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -29020,79 +29083,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -29100,127 +29163,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -29229,74 +29292,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -29305,291 +29371,292 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 #, fuzzy msgid "Adding a turret" msgstr "添加脚本" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -29597,185 +29664,191 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 #, fuzzy msgid "Add the following code to ``TurretBodies.gd``:" msgstr "在你的 ``config.py`` 脚本中添加下面的代码片段:" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -29783,37 +29856,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -29898,7 +29971,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -29961,8 +30034,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -29985,7 +30058,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29995,118 +30068,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -30114,51 +30187,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -30167,19 +30241,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -30188,80 +30261,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -30270,42 +30349,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -30315,21 +30394,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -30337,7 +30416,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -30346,7 +30425,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -30355,415 +30434,420 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 #, fuzzy msgid "Add the following to ``Globals.gd``:" msgstr "在你的 ``config.py`` 脚本中添加下面的代码片段:" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 #, fuzzy msgid "Starting the respawn system" msgstr "设置项目路径" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 #, fuzzy msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "在你的 ``config.py`` 脚本中添加下面的代码片段:" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -30771,7 +30855,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -30779,302 +30863,315 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 #, fuzzy msgid "Add the following to ``load_new_scene``:" msgstr "添加下面这些头文件(导入)目录:" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -31082,26 +31179,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -35680,6 +35777,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "动画" @@ -37880,9 +37978,10 @@ msgid "Configuring the imported translation" msgstr "配置导入的译文" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 +#, fuzzy msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" "翻译可以在更改时得到更新和重新导入, 但仍必须添加到项目中。通过\"场景\" > \"项" @@ -48114,6 +48213,421 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +#, fuzzy +msgid "GDNative C++ example" +msgstr "GDNative / C++" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +#, fuzzy +msgid "Setting up your project" +msgstr "创建一个项目" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +#, fuzzy +msgid "There are a few prerequisites you'll need:" +msgstr "这可能有几个原因:" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +#, fuzzy +msgid "Creating a simple plugin" +msgstr "创建主题" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +#, fuzzy +msgid "Compiling our plugin" +msgstr "开始编译" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +#, fuzzy +msgid "Using your GDNative module" +msgstr "使用模块" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -54794,126 +55308,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -54923,11 +55353,401 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "NodePath" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +#, fuzzy +msgid "AnimationPlayer" +msgstr "动画" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +#, fuzzy +msgid "ArrayMesh" +msgstr "数组" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +#, fuzzy +msgid "arrays" +msgstr "数组" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +#, fuzzy +msgid "An example of ArrayMesh:" +msgstr "示例用法:" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +#, fuzzy +msgid "imported" +msgstr "Viewport" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +#, fuzzy +msgid "'transform'" +msgstr "变换" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "值" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +#, fuzzy +msgid "0 (constant)" +msgstr "常量" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -57653,6 +58473,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be " diff --git a/weblate/zh_TW.po b/weblate/zh_TW.po index faa3e3101f..9df9846c5e 100644 --- a/weblate/zh_TW.po +++ b/weblate/zh_TW.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" -"POT-Creation-Date: 2018-06-06 09:15+0200\n" +"POT-Creation-Date: 2018-06-13 14:08+0200\n" "PO-Revision-Date: 2018-04-29 15:59+0000\n" "Last-Translator: Matt \n" "Language-Team: Chinese (Traditional) `'s velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:264 msgid "" "``MAX_SPEED``: The fastest speed we can reach. Once we hit this speed, we " "will not go any faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:265 msgid "``JUMP_SPEED``: How high we can jump." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:266 msgid "" "``ACCEL``: How fast we accelerate. The higher the value, the faster we get " "to max speed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:267 msgid "" "``DEACCEL``: How fast we are going to decelerate. The higher the value, the " "faster we will come to a complete stop." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:268 msgid "" "``MAX_SLOPE_ANGLE``: The steepest angle our :ref:`KinematicBody " "` will consider as a 'floor'." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:269 msgid "``camera``: The :ref:`Camera ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:270 msgid "" "``rotation_helper``: A :ref:`Spatial ` node holding " "everything we want to rotate on the X axis (up and down)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:271 msgid "" "``MOUSE_SENSITIVITY``: How sensitive the mouse is. I find a value of " "``0.05`` works well for my mouse, but you may need to change it based on how " "sensitive your mouse is." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:273 msgid "" "You can tweak many of these variables to get different results. For example, " "by lowering ``GRAVITY`` and/or increasing ``JUMP_SPEED`` you can get a more " "'floaty' feeling character. Feel free to experiment!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:278 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:277 msgid "" "You may have noticed that ``MOUSE_SENSITIVITY`` is written in all caps like " "the other constants, but is ``MOUSE_SENSITIVITY`` is not a constant." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:279 msgid "" "The reason behind this is we want to treat it like a constant variable (a " "variable that cannot change) throughout our script, but we want to be able " @@ -23416,30 +23418,30 @@ msgid "" "caps." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:285 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:284 msgid "Now let's look at the ``_ready`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:286 msgid "" "First we get the ``camera`` and ``rotation_helper`` nodes and store them " "into their variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:289 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:288 msgid "" "Then we need to set the mouse mode to captured so the mouse cannot leave the " "game window." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:291 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:290 msgid "" "This will hide the mouse and keep it at the center of the screen. We do this " "for two reasons: The first reason being we do not want to the player to see " "their mouse cursor as they play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:293 msgid "" "The second reason is because we do not want the cursor to leave the game " "window. If the cursor leaves the game window there could be instances where " @@ -23447,121 +23449,121 @@ msgid "" "assure neither of these issues happen, we capture the mouse cursor." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:298 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:297 msgid "" "see :ref:`Input documentation ` for the various mouse modes. We " "will only be using ``MOUSE_MODE_CAPTURED`` and ``MOUSE_MODE_VISIBLE`` in " "this tutorial series." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:302 msgid "Next let's take a look at ``_physics_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:305 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:304 msgid "" "All we're doing in ``_physics_process`` is calling two functions: " "``process_input`` and ``process_movement``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:307 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:306 msgid "" "``process_input`` will be where we store all of the code relating to player " "input. We want to call it first before anything else so we have fresh player " "input to work with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:310 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:309 msgid "" "``process_movement`` is where we'll send all of the date necessary to the :" "ref:`KinematicBody ` so it can move through the game " "world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:314 msgid "Let's look is ``process_movement`` next:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:316 msgid "First we set ``dir`` to an empty :ref:`Vector3 `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:318 msgid "" "``dir`` will be used for storing the direction the player intends to move " "towards. Because we do not want the player's previous input to effect the " "player beyond a single ``process_movement`` call, we reset ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:321 msgid "" "Next we get the camera's global transform and store it as well, into the " "``cam_xform`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:323 msgid "" "The reason we need the camera's global transform is so we can use it's " "directional vectors. Many have found directional vectors confusing, so let's " "take a second to explain how they work:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:328 msgid "" "World space can be defined as: The space in which all objects are placed in, " "relative to a constant origin point. Every object, no matter if it is 2D or " "3D, has a position in world space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:332 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:331 msgid "" "To put it another way: world space is the space in a universe where every " -"object's position, rotation, and scale can be measured by a known, fixed " -"point called the origin." +"object's position, rotation, and scale can be measured by a single, known, " +"fixed point called the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:335 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:334 msgid "" "In Godot, the origin is at position ``(0, 0, 0)`` with a rotation of ``(0, " "0, 0)`` and a scale of ``(1, 1, 1)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:337 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:336 msgid "" "When you open up the Godot editor and select a :ref:`Spatial " "` based node, a gizmo pops up. Each of the arrows points " "using world space directions by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:340 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:339 msgid "" "If you want to move using the world space directional vectors, you'd do " "something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:353 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:352 msgid "" "Notice how we do not need to do any calculations to get world space " "directional vectors. We can define a few :ref:`Vector3 ` " "variables and input the values pointing in each direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:356 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:355 msgid "Here is what world space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:358 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:357 msgid "" "The following images are just examples. Each arrow/rectangle represents a " "directional vector" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:362 -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:405 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:404 msgid "And here is what it looks like for 3D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:365 msgid "" "Notice how in both examples, the rotation of the node does not change the " "directional arrows. This is because world space is a constant. No matter how " @@ -23569,13 +23571,13 @@ msgid "" "the same direction*." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:369 msgid "" "Local space is different, because it takes the rotation of the object into " "account." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:372 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:371 msgid "" "Local space can be defined as follows: The space in which a object's " "position is the origin of the universe. Because the position of the origin " @@ -23583,44 +23585,44 @@ msgid "" "with the position of the origin." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:377 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:376 msgid "" "This stack overflow question has a much better explanation of world space " "and local space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:379 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:378 msgid "" "https://gamedev.stackexchange.com/questions/65783/what-are-world-space-and-" "eye-space-in-game-development (Local space and eye space are essentially the " "same thing in this context)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:381 msgid "" "To get a :ref:`Spatial ` node's local space, we need to get " "its :ref:`Transform `, so then we can get the :ref:`Basis " "` from the :ref:`Transform `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:385 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:384 msgid "" "Each :ref:`Basis ` has three vectors: ``X``, ``Y``, and ``Z``. " "Each of those vectors point towards each of the local space vectors coming " "from that object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:387 msgid "" "To use the a :ref:`Spatial ` node's local directional " "vectors, we use this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:401 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:400 msgid "Here is what local space looks like in 2D:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:409 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:408 msgid "" "Here is what the :ref:`Spatial ` gizmo shows when you are " "using local space mode. Notice how the arrows follow the rotation of the " @@ -23628,14 +23630,14 @@ msgid "" "space." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:412 msgid "" "You can change between local and world space modes by pressing the little " "cube button when you have a :ref:`Spatial ` based node " "selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:418 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:417 msgid "" "Local vectors are confusing even for more experienced game developers, so do " "not worry if this all doesn't make a lot of sense. The key thing to remember " @@ -23644,44 +23646,45 @@ msgid "" "give direction from the world's point of view." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:423 msgid "Okay, back to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:425 msgid "" "Next we make a new variable called ``input_movement_vector`` and assign it " "to an empty :ref:`Vector2 `. We will use this to make a " "virtual axis of sorts so map the player's input to movement." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:429 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:428 msgid "" "This may seem overkill for just the keyboard, but this will make sense later " "when we add joypad input." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:431 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:430 msgid "" "Based on which directional movement action is pressed, we add or remove from " "``input_movement_vector``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:432 msgid "" "After we've checked each of the directional movement actions, we normalize " "``input_movement_vector``. This makes it where ``input_movement_vector``'s " "values are within a ``1`` radius unit circle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:436 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:435 msgid "" "Next we add the camera's local ``Z`` vector times ``input_movement_vector." -"y`` to ``dir``. This where when we pressed forward or backwards we add the " -"camera's local ``Z`` axis, so we move forward in relation to the camera." +"y`` to ``dir``. This is so when the player presses forward or backwards, we " +"add the camera's local ``Z`` axis so the player moves forward or backwards " +"in relation to the camera." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:439 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:438 msgid "" "Because the camera is rotated by ``-180`` degrees, we have to flip the ``Z`` " "directional vector. Normally forward would be the positive Z axis, so using " @@ -23690,27 +23693,28 @@ msgid "" "the rest of the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:443 msgid "" "We do the same thing for the camera's local ``X`` vector, and instead of " "using ``input_movement_vector.y`` we instead use ``input_movement_vector." -"x``. This makes it where when we press left or right, we move left/right in " -"relation to the camera." +"x``. This makes it where the player moves left/right in relation to the " +"camera when the player presses left/right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:447 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:446 msgid "" "Next we check if the player is on the floor using :ref:`KinematicBody " "`'s ``is_on_floor`` function. If it is, then we check " "to see if the \"movement_jump\" action has just been pressed. If it has, " -"then we set our ``Y`` velocity to ``JUMP_SPEED``." +"then we set the player's ``Y`` velocity to ``JUMP_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:451 -msgid "Because we're setting the Y velocity, we will jump into the air." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:450 +msgid "" +"Because we're setting the Y velocity, the player will jump into the air." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:453 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:452 msgid "" "Then we check for the ``ui_cancel`` action. This is so we can free/capture " "the mouse cursor when the ``escape`` button is pressed. We do this because " @@ -23718,162 +23722,164 @@ msgid "" "until you terminate the runtime." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:456 msgid "" "To free/capture the cursor, we check to see if the mouse is visible (freed) " -"or not. If it is, then we capture it, and if it's not we make it visible " -"(free it)." +"or not. If it is, we capture it, and if it's not we make it visible (free " +"it)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:458 msgid "" "That's all we're doing right now for ``process_input``. We'll come back " "several times to this function as we add more complexities to our player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:462 msgid "Now let's look at ``process_movement``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:464 msgid "" "First we assure that ``dir`` does not have any movement on the ``Y`` axis by " "setting it's ``Y`` value to zero." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:467 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:466 msgid "" "Next we normalize ``dir`` to assure we're within a ``1`` radius unit circle. " "This makes it where we're moving at a constant speed regardless of whether " -"we've moving straight, or moving diagonal. If we did not normalize, we would " -"move faster on the diagonal than when we're going straight." +"the player is moving straight, or moving diagonally. If we did not " +"normalize, the player would move faster on the diagonal than when going " +"straight." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:469 msgid "" -"Next we add gravity to our player by adding ``GRAVITY * delta`` to our ``Y`` " -"velocity." +"Next we add gravity to the player by adding ``GRAVITY * delta`` to the " +"player's ``Y`` velocity." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:471 msgid "" -"After that we assign our velocity to a new variable (called ``hvel``) and " -"remove any movement on the ``Y`` axis." +"After that we assign the player's velocity to a new variable (called " +"``hvel``) and remove any movement on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:474 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:473 msgid "" -"Next we set a new variable (``target``) to our direction vector. Then we " -"multiply that by our max speed so we know how far we will can move in the " -"direction provided by ``dir``." +"Next we set a new variable (``target``) to the player's direction vector. " +"Then we multiply that by the player's max speed so we know how far the " +"player will move in the direction provided by ``dir``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:477 -msgid "" -"After that we make a new variable for our acceleration, named ``accel``." +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:476 +msgid "After that we make a new variable for acceleration, named ``accel``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:479 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:478 msgid "" -"We then take the dot product of ``hvel`` to see if we are moving according " -"to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, meaning we " -"are only checking if we are moving forwards, backwards, left, or right." +"We then take the dot product of ``hvel`` to see if the player is moving " +"according to ``hvel``. Remember, ``hvel`` does not have any ``Y`` velocity, " +"meaning we are only checking if the player is moving forwards, backwards, " +"left, or right." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:482 msgid "" -"If we are moving according to ``hvel``, then we set ``accel`` to our " -"``ACCEL`` constant so we accelerate, otherwise we set ``accel` to our " -"``DEACCEL`` constant so we decelerate." +"If the player is moving according to ``hvel``, then we set ``accel`` to the " +"``ACCEL`` constant so the player will accelerate, otherwise we set ``accel` " +"to our ``DEACCEL`` constant so the player will decelerate." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:486 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:485 msgid "" -"Then we interpolate our horizontal velocity, set our ``X`` and ``Z`` " -"velocity to the interpolated horizontal velocity, and call " +"Then we interpolate the horizontal velocity, set the player's ``X`` and " +"``Z`` velocity to the interpolated horizontal velocity, and call " "``move_and_slide`` to let the :ref:`KinematicBody ` " -"handle moving through the physics world." +"handle moving the player through the physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:489 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:488 msgid "" "All of the code in ``process_movement`` is exactly the same as the movement " "code from the Kinematic Character demo!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:492 msgid "" "The final function we have is the ``_input`` function, and thankfully it's " "fairly short:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:495 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:494 msgid "" "First we make sure that the event we are dealing with is a :ref:" "`InputEventMouseMotion ` event. We also want to " "check if the cursor is captured, as we do not want to rotate if it is not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:498 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:497 msgid "" "See :ref:`Mouse and input coordinates ` for " "a list of possible input events." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:501 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:500 msgid "" "If the event is indeed a mouse motion event and the cursor is captured, we " "rotate based on the relative mouse motion provided by :ref:" "`InputEventMouseMotion `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:503 msgid "" "First we rotate the ``rotation_helper`` node on the ``X`` axis, using the " "relative mouse motion's ``Y`` value, provided by :ref:`InputEventMouseMotion " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:507 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:506 msgid "" "Then we rotate the entire :ref:`KinematicBody ` on the " "``Y`` axis by the relative mouse motion's ``X`` value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:509 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:508 msgid "" "Godot converts relative mouse motion into a :ref:`Vector2 ` " "where mouse movement going up and down is ``1`` and ``-1`` respectively. " "Right and Left movement is ``1`` and ``-1`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:513 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:512 msgid "" "Because of how we are rotating the player, we multiply the relative mouse " "motion's ``X`` value by ``-1`` so mouse motion going left and right rotates " "the player left and right in the same direction." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:516 msgid "" "Finally, we clamp the ``rotation_helper``'s ``X`` rotation to be between " -"``-70`` and ``70`` degrees so we cannot rotate ourselves upside down." +"``-70`` and ``70`` degrees so the player cannot rotate themselves upside " +"down." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:519 msgid "" "see :ref:`using transforms ` for more information on " "rotating transforms." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:523 msgid "" "To test the code open up the scene named ``Testing_Area.tscn``, if it's not " -"already opened up. We will be using this scene as we go through the " -"tutorial, so be sure to keep it open in one of your scene tabs." +"already opened up. We will be using this scene as we go through the next few " +"tutorial parts, so be sure to keep it open in one of your scene tabs." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:527 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:526 msgid "" "Go ahead and test your code either by pressing ``F4`` with ``Testing_Area." "tscn`` as the open tab, by pressing the play button in the top right corner, " @@ -23881,158 +23887,158 @@ msgid "" "air, and look around using the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:533 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:532 msgid "Giving the player a flash light and the option to sprint" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:535 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:534 msgid "" "Before we get to making the weapons work, there is a couple more things we " "should add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:536 msgid "" -"Many FPS games have an option to sprint and a flash light. We can easily add " +"Many FPS games have an option to sprint and a flashlight. We can easily add " "these to our player, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:540 -msgid "First we need a few more global variables in our player script:" +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:539 +msgid "First we need a few more class variables in our player script:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:549 msgid "" "All of the sprinting variables work exactly the same as the non sprinting " "variables with similar names." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:553 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:552 msgid "" "``is_sprinting`` is a boolean to track whether the player is currently " -"sprinting, and ``flashlight`` is a variable we will be using to hold our " -"flash light node." +"sprinting, and ``flashlight`` is a variable we will be using to hold the " +"player's flash light node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:556 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:555 msgid "" "Now we need to add a few lines of code, starting in ``_ready``. Add the " "following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:561 msgid "" -"This gets our flash light node and assigns it to the ``flashlight`` variable." +"This gets the flash light node and assigns it to the ``flashlight`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:566 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:565 msgid "" "Now we need to change some of the code in ``process_input``. Add the " "following somewhere in ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:586 msgid "Let's go over the additions:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:588 msgid "" -"We set ``is_sprinting`` to true when we are holding down the " +"We set ``is_sprinting`` to true when the player is holding down the " "``movement_sprint`` action, and false when the ``movement_sprint`` action is " "released. In ``process_movement`` we'll add the code that makes the player " -"faster when they sprint. Here in ``process_input`` we're going to change the " -"``is_sprinting`` variable." +"faster when they sprint. Here in ``process_input`` we are just going to " +"change the ``is_sprinting`` variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:593 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:592 msgid "" -"We do something similar freeing/capturing the cursor for handling the flash " -"light. We first check to see if the ``flashlight`` action was just pressed. " -"If it was, we then check to see if ``flashlight`` is visible in the scene " -"tree. If it is, then we hide it, and if it's not we show it." +"We do something similar to freeing/capturing the cursor for handling the " +"flashlight. We first check to see if the ``flashlight`` action was just " +"pressed. If it was, we then check to see if ``flashlight`` is visible in the " +"scene tree. If it is, then we hide it, and if it's not we show it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:597 msgid "" "Now we need to change a couple things in ``process_movement``. First, " "replace ``target *= MAX_SPEED`` with the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:606 msgid "" "Now instead of always multiplying ``target`` by ``MAX_SPEED``, we first " -"check to see if we are sprinting or not. If we are sprinting, we instead " -"multiply ``target`` by ``MAX_SPRINT_SPEED``." +"check to see if the player is sprinting or not. If the player is sprinting, " +"we instead multiply ``target`` by ``MAX_SPRINT_SPEED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:609 msgid "" -"Now all that's left is changing the accleration when sprinting. Change " +"Now all that's left is changing the acceleration when sprinting. Change " "``accel = ACCEL`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:620 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:619 msgid "" -"Now when we are sprinting we'll use ``SPRINT_ACCEL`` instead of ``ACCEL``, " -"which will accelerate us faster." +"Now when the player is sprinting we'll use ``SPRINT_ACCEL`` instead of " +"``ACCEL``, which will accelerate the player faster." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:623 msgid "" "You should now be able to sprint if you press the ``shift`` button, and can " "toggle the flash light on and off by pressing the ``F`` button!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:625 msgid "" -"Go give it a whirl! You can change the sprint related global variables to " +"Go give it a whirl! You can change the sprint related class variables to " "make the player faster or slower when sprinting!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:629 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:668 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:666 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:724 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:947 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:972 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:977 msgid "Final notes" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:633 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:632 msgid "" "Phew! That was a lot of work. Now you have a fully working first person " "character!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:634 msgid "" "In :ref:`doc_fps_tutorial_part_two` we will add some guns to our player " "character." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:636 msgid "" "At this point we've recreated the Kinematic character demo from first person " "perspective with sprinting and a flash light!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:639 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:638 msgid "" "Currently the player script would be at an ideal state for making all sorts " "of first person games. For example: Horror games, platformer games, " "adventure games, and more!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:642 -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1247 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1256 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:681 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:733 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:980 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:961 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:985 msgid "If you ever get lost, be sure to read over the code again!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_one.rst:643 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_1.zip `" @@ -24067,7 +24073,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:21 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:22 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:19 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:17 #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:20 @@ -24100,7 +24106,7 @@ msgid "Lets go over what this script is doing:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:157 -msgid "Lets start with this script's global variables:" +msgid "Lets start with this script's class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:159 @@ -24137,18 +24143,19 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:167 msgid "" "``states`` is a dictionary with the key being the name of the current state, " -"and the value being an array holding all of the states we can transition to. " -"For example, if we are in currently in state ``Idle_unarmed``, we can only " -"transition to ``Knife_equip``, ``Pistol_equip``, ``Rifle_equip``, and " -"``Idle_unarmed``." +"and the value being an array holding all of the animations (states) we can " +"transition to. For example, if we are in currently in state " +"``Idle_unarmed``, we can only transition to ``Knife_equip``, " +"``Pistol_equip``, ``Rifle_equip``, and ``Idle_unarmed``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:172 msgid "" -"If we try to transition to a state that is not included in our possible " -"transitions states, then we get a warning message and the animation does not " -"change. We can also automatically transition from some states into others, " -"as will be explained further below in ``animation_ended``" +"If we try to transition to a state that is not included in the possible " +"transitions states for the state we are in, then we get a warning message " +"and the animation does not change. We can also automatically transition from " +"some states into others, as will be explained further below in " +"``animation_ended``" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:176 @@ -24196,7 +24203,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:191 msgid "" "Finally, ``callback_function`` will be a :ref:`FuncRef ` " -"passed in by our player for spawning bullets at the proper frame of " +"passed in by the player for spawning bullets at the proper frame of " "animation. A :ref:`FuncRef ` allows us to pass in a function " "as an argument, effectively allowing us to call a function from another " "script, which is how we will use it later." @@ -24307,7 +24314,7 @@ msgstr "" msgid "" "For certain animation states, we may need to transition into another state " "when its finished. To handle this, we check for every possible animation " -"state. If we need to, we transition into another state." +"state. If we need to, we will transition into another state." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:249 @@ -24765,7 +24772,7 @@ msgid "Lets go through the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:496 -msgid "First we define a few global variables:" +msgid "First we define a few class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:498 @@ -24806,9 +24813,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:511 msgid "" -"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase " -"global variables. The reason behind this is the same as the reason given in :" -"ref:`doc_fps_tutorial_part_one`: We want to treat these variables like " +"As in :ref:`doc_fps_tutorial_part_one`, we have a couple all uppercase class " +"variables. The reason behind this is the same as the reason given in :ref:" +"`doc_fps_tutorial_part_one`: We want to treat these variables like " "constants, but we want to be able to change them. In this case we will later " "need to change the damage and speed of these bullets, so we need them to be " "variables and not constants." @@ -24847,37 +24854,39 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:535 msgid "" "Remember that ``collided`` is only called when a body has entered the :ref:" -"`Area ` node. If we have not already collided with something, we " -"then proceed to check if the body we've collided with has a function/method " -"called ``bullet_hit``. If it does, we call it and pass in our damage and our " -"position." +"`Area ` node. If the bullet has not already collided with " +"something, we then proceed to check if the body the bullet has collided with " +"has a function/method called ``bullet_hit``. If it does, we call it and pass " +"in the bullet's damage and the bullet's global transform so we can get the " +"bullet's rotation and position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:539 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:540 msgid "" "in ``collided``, the passed in body can be a :ref:`StaticBody " "`, :ref:`RigidBody `, or :ref:" "`KinematicBody `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:543 msgid "" -"We set ``hit_something`` to ``true`` because regardless of whether or not " -"the body the bullet collided with has the ``bullet_hit`` function/method, it " -"has hit something and so we need to not hit anything else." +"We set the Bullet's ``hit_something`` variable to ``true`` because " +"regardless of whether or not the body the bullet collided with has the " +"``bullet_hit`` function/method, it has hit something and so we need to make " +"sure the bullet does not hit anything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:546 msgid "Then we free the bullet using ``queue_free``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:547 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:548 msgid "" "You may be wondering why we even have a ``hit_something`` variable if we " "free the bullet using ``queue_free`` as soon as it hits something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:551 msgid "" "The reason we need to track whether we've hit something or not is because " "``queue_free`` does not immediately free the node, so the bullet could " @@ -24886,19 +24895,19 @@ msgid "" "hit one object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:558 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:559 msgid "" "Before we start programming the player again, let's take a quick look at " "``Player.tscn``. Open up ``Player.tscn`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:562 msgid "" "Expand ``Rotation_Helper`` and notice how it has two nodes: " "``Gun_Fire_Points`` and ``Gun_Aim_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:565 msgid "" "``Gun_aim_point`` is the point that the bullets will be aiming at. Notice " "how it is lined up with the center of the screen and pulled a distance " @@ -24906,26 +24915,26 @@ msgid "" "bullets will for sure collide with as it goes along." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:569 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:570 msgid "" "There is a invisible mesh instance for debugging purposes. The mesh is a " "small sphere that visually shows where the bullets will be aiming at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:572 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:573 msgid "" "Open up ``Gun_Fire_Points`` and you'll find three more :ref:`Spatial " "` nodes, one for each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:576 msgid "" "Open up ``Rifle_Point`` and you'll find a :ref:`Raycast ` " "node. This is where we will be sending the raycasts for our rifle's bullets. " "The length of the raycast will dictate how far our the bullets will travel." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:579 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:580 msgid "" "We are using a :ref:`Raycast ` node to handle the rifle's " "bullet because we want to fire lots of bullets quickly. If we use bullet " @@ -24933,7 +24942,7 @@ msgid "" "machines." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:583 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:584 msgid "" "If you are wondering where the positions of the points came from, they are " "the rough positions of the ends of each weapon. You can see this by going to " @@ -24942,7 +24951,7 @@ msgid "" "the end of each weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:589 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:590 msgid "" "Open up ``Knife_Point`` and you'll find a :ref:`Area ` node. We " "are using a :ref:`Area ` for the knife because we only care for " @@ -24951,20 +24960,20 @@ msgid "" "object that looks like a knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:595 msgid "" "Finally, we have ``Pistol_Point``. This is the point where we will be " "creating/instancing our bullet objects. We do not need any additional nodes " "here, as the bullet handles all of its own collision detection." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:599 msgid "" "Now that we've seen how we will handle our other weapons, and where we will " "spawn the bullets, let's start working on making them work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:602 msgid "" "You can also look at the HUD nodes if you want. There is nothing fancy there " "and other than using a single :ref:`Label `, we will not be " @@ -24973,66 +24982,66 @@ msgid "" "nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:607 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:608 msgid "Creating the first weapon" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:609 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:610 msgid "Lets write the code for each of our weapons, starting with the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:611 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:612 msgid "" "Select ``Pistol_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Pistol_Point``) and create a new script called " "``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:613 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:614 msgid "Add the following code to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:664 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:665 msgid "Let's go over how the script works." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:668 -msgid "First we define some global variables we'll need in the script:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:670 -msgid "``DAMAGE``: The amount of damage a single bullet does." +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:669 +msgid "First we define some class variables we'll need in the script:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:671 -msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." +msgid "``DAMAGE``: The amount of damage a single bullet does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:672 -msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgid "``IDLE_ANIM_NAME``: The name of the pistol's idle animation." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:673 +msgid "``FIRE_ANIM_NAME``: The name of the pistol's fire animation." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 msgid "" "``is_weapon_enabled``: A variable for checking whether this weapon is in use/" "enabled." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 msgid "``bullet_scene``: The bullet scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:676 msgid "``player_node``: A variable to hold ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:678 msgid "" "The reason we define most of these variables is so we can use them in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:679 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:680 msgid "" "All of the weapons we'll make will have all of these variables (minus " "``bullet_scene``) so we have a consistent interface to interact with in " @@ -25042,7 +25051,7 @@ msgid "" "to change much of the code in ``Player.gd`` and it will just work." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:684 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:685 msgid "" "If we could write all of the code in ``Player.gd``, but then ``Player.gd`` " "will get increasingly harder to manage as we add weapons. By using a modular " @@ -25050,23 +25059,23 @@ msgid "" "while also making it easier to add/remove/modify weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:689 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:690 msgid "In ``_ready`` we simply pass over it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:691 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:692 msgid "" "There is one thing of note though, an assumption we're assuming we'll fill " "in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:693 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:694 msgid "" "We are going to assume that ``Player.gd`` will pass themselves in before " "calling any of the functions in ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:696 msgid "" "While this can lead to situations where the player does not pass themselves " "in (because we forget), we would have to have a long string of " @@ -25076,28 +25085,28 @@ msgid "" "to each weapon in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:701 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:702 msgid "Next let's look at ``fire_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:703 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:704 msgid "The first thing we do is instance the bullet scene we made earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:705 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:706 msgid "" "By instancing the scene, we are creating a new node holding all of the " "node(s) in the scene we instanced, effectively cloning that scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:708 msgid "" "Then we add ``clone`` to the first child node of the root of the scene we " "are currently in. By doing this we're making it at a child of the root node " "of the currently loaded scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:709 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:710 msgid "" "In other words, we are adding ``clone`` as a child of the first node " "(whatever is at the top of the scene tree) in the currently loaded/opened " @@ -25106,21 +25115,21 @@ msgid "" "scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:712 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:713 msgid "" "As mentioned later below in the section on adding sounds, this method makes " "a assumption. This will be explained later in the section on adding sounds " "in :ref:`doc_fps_tutorial_part_three`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:716 msgid "" "Next we set the global transform of the clone to the ``Pistol_Aim_Point``'s " "global transform. The reason we do this is so the bullet is spawned at the " "end of the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:717 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:718 msgid "" "You can see that ``Pistol_Aim_Point`` is positioned right at the end of the " "pistol by clicking the :ref:`AnimationPlayer ` and " @@ -25128,380 +25137,387 @@ msgid "" "at the end of the pistol when it fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:720 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:721 msgid "" "Next we scale it up by a factor of ``4`` because the bullet scene is a " "little too small by default." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:722 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:723 msgid "" "Then we set the bullet's damage (``BULLET_DAMAGE``) to the amount of damage " "a single pistol bullet does (``DAMAGE``)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:726 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:727 msgid "Now let's look at ``equip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:728 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:729 msgid "" "The first thing we do is check to see if the animation manager is in the " "pistol's idle animation. If we are in the pistol's idle animation, we set " -"``is_weapon_enabled`` to ``true`` and return ``true`` because we have " +"``is_weapon_enabled`` to ``true`` and return ``true`` because the pistol has " "successfully been equipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:732 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:733 msgid "" "Because we know our pistol's ``equip`` animation automatically transitions " -"to the pistol's idle animation, if we are in the pistol's idle animation we " -"most have finished playing the equip animation." +"to the pistol's idle animation, if we are in the pistol's idle animation the " +"pistol most have finished playing the equip animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:735 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:736 msgid "" "We know these animations will transition because we wrote to the code to " "make them transition in ``Animation_Manager.gd``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:737 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:738 msgid "" -"Next we check to see if we are in the ``Idle_unarmed`` animation state. " -"Because all unequipping animations go to this state, and because any weapon " -"can be equipped from this state, we change animations to ``Pistol_equip`` if " -"we are in ``Idle_unarmed``." +"Next we check to see if the player is in the ``Idle_unarmed`` animation " +"state. Because all unequipping animations go to this state, and because any " +"weapon can be equipped from this state, we change animations to " +"``Pistol_equip`` if the player is in the ``Idle_unarmed`` state." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:741 msgid "" "Since we know ``Pistol_equip`` will transition to ``Pistol_idle``, we do not " "need to do any more additional processing for equipping weapons, but since " "we were not able to equip the pistol yet, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:746 msgid "Finally, let's look at ``unequip_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:747 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:748 msgid "" "``unequip_weapon`` is similar to ``equip_weapon``, but instead we're " "checking things in reverse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:750 msgid "" -"First we check to see if we are in our idle animation. Then check to make " -"sure we are not in the ``Pistol_unequip`` animation. If we are not in the " -"``Pistol_unequip`` animation, we want to play ``pistol_unequip``." +"First we check to see if the player is in the idle animation state. Then we " +"check to make sure the player is not in the ``Pistol_unequip`` animation. If " +"the player is not in the ``Pistol_unequip`` animation, we want to play " +"``pistol_unequip`` animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:752 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:753 msgid "" -"You may be wondering why we are checking to see if we are the pistol's idle " -"animation, and then making sure we are not unequipping right after. The " -"reason behind the additional check is because we could (in rare cases) call " -"``unequip_weapon`` twice before we've had a chance to process " -"``set_animation``, so we add this additional check to make sure the unequip " -"animation plays." +"You may be wondering why we are checking to see if the player is in the " +"pistol's idle animation, and then making sure the player is not unequipping " +"right after. The reason behind the additional check is because we could (in " +"rare cases) call ``unequip_weapon`` twice before we've had a chance to " +"process ``set_animation``, so we add this additional check to make sure the " +"unequip animation plays." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:756 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:757 msgid "" -"Next we check to see if we are in ``Idle_unarmed``, which is the animation " -"state we will transition into from ``Pistol_unequip``. If we are, then we " -"set ``is_weapon_enabled`` to false since we are no longer using this weapon, " -"and return ``true`` because we have successfully unequipped the pistol." +"Next we check to see if the player is in ``Idle_unarmed``, which is the " +"animation state we will transition into from ``Pistol_unequip``. If the " +"player is are, then we set ``is_weapon_enabled`` to ``false`` since we are " +"no longer using this weapon, and return ``true`` because we have " +"successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:759 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:760 msgid "" -"If we are not in ``Idle_unarmed``, we return ``false`` because we have not " -"yet successfully unequipped the pistol." +"If the player is not in ``Idle_unarmed``, we return ``false`` because we " +"have not yet successfully unequipped the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:762 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:763 msgid "Creating the other two weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:764 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:765 msgid "" "Now that we all of the code we'll need for the pistol, let's add the code " "for the rifle and knife next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:766 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:767 msgid "" "Select ``Rifle_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Rifle_Point``) and create a new script called " "``Weapon_Rifle.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:819 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:820 msgid "" "Most of this is exactly the same as ``Weapon_Pistol.gd``, so we're only " "going to look at what's changed: ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:821 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:822 msgid "" "The first thing we do is get the :ref:`Raycast ` node, which " "is a child of ``Rifle_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:823 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:824 msgid "" -"Next we force the raycast to update using ``force_raycast_update``. This " -"will force the raycast to detect collisions when we call it, meaning we get " -"a frame perfect collision check with the 3D physics world." +"Next we force the :ref:`Raycast ` to update using " +"``force_raycast_update``. This will force the :ref:`Raycast ` " +"to detect collisions when we call it, meaning we get a frame perfect " +"collision check with the 3D physics world." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:826 -msgid "Then we check to see if the raycast collided with something." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:827 msgid "" -"If the raycast has collided with something, we first get the collision body " -"it collided with. This can be a :ref:`StaticBody `, :ref:" -"`RigidBody `, or a :ref:`KinematicBody " -"`." +"Then we check to see if the :ref:`Raycast ` collided with " +"something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:831 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:829 +msgid "" +"If the :ref:`Raycast ` has collided with something, we first " +"get the collision body it collided with. This can be a :ref:`StaticBody " +"`, :ref:`RigidBody `, or a :ref:" +"`KinematicBody `." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:832 msgid "" "Next we want to make sure the body we've collided with is not the player, " "since we (probably) do not want to give the player the ability to shoot " "themselves in the foot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:834 msgid "" "If the body is not the player, we then check to see if they have a function/" "method called ``bullet_hit``. If they do, we call it and pass in the amount " -"of damage this bullet does (``DAMAGE``), and the point where the raycast " -"collided with the body." +"of damage this bullet does (``DAMAGE``), and the global transform of the :" +"ref:`Raycast ` so we can tell which direction the bullet came " +"from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:838 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:839 msgid "Now all we need to do is write the code for the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:841 msgid "" "Select ``Knife_Point`` (``Player`` -> ``Rotation_Helper`` -> " "``Gun_Fire_Points`` -> ``Knife_Point``) and create a new script called " "``Weapon_Knife.gd``, then add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:892 msgid "" "As with ``Weapon_Rifle.gd``, the only differences are in ``fire_weapon``, so " "let's look at that:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:893 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:894 msgid "" "The first thing we do is get the :ref:`Area ` child node of " "``Knife_Point``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:895 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:896 msgid "" -"Next we want to get all of the collision bodies inside the area using " -"``get_overlapping_bodies``. This will return a list of every body that " -"touches the area." +"Next we want to get all of the collision bodies inside the :ref:`Area " +"` using ``get_overlapping_bodies``. This will return a list of " +"every body that touches the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:899 msgid "We next want to go through each of those bodies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:900 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:901 msgid "" "First we check to make sure the body is not the player, because we do not " -"want to be able to stab ourselves. If the body is the player, we use " -"``continue`` so we jump to looking at the next body in ``bodies``." +"want to let the player be able to stab themselves. If the body is the " +"player, we use ``continue`` so we jump to looking at the next body in " +"``bodies``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:903 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:904 msgid "" "If we have not jumped to the next body, we then check to see if the body has " "the ``bullet_hit`` function/method. If it does, we call it, passing in the " -"amount of damage a single knife swipe does (``DAMAGE``) and the position of " -"the :ref:`Area `." +"amount of damage a single knife swipe does (``DAMAGE``) and the global " +"transform of the :ref:`Area `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:906 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:907 msgid "" -"While we could attempt to calculate a rough location for where the knife " -"hit, we do not bother because using the area's position works well enough " -"and the extra time needed to calculate a rough position for each body is not " -"worth the effort." +"While we could attempt to calculate a rough location for where the knife hit " +"exactly, we are not going to because using the :ref:`Area `'s " +"position works well enough and the extra time needed to calculate a rough " +"position for each body is not worth the effort." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:911 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:912 msgid "Making the weapons work" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:913 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:914 msgid "Lets start making the weapons work in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:915 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:916 msgid "" -"First lets start by adding some global variables we'll need for the weapons:" +"First lets start by adding some class variables we'll need for the weapons:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:934 msgid "Lets go over what these new variables will do:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 msgid "" "``animation_manager``: This will hold the :ref:`AnimationPlayer " "` node and its script, which we wrote previously." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:936 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 msgid "" "``current_weapon_name``: The name of the weapon we are currently using. It " "has four possible values: ``UNARMED``, ``KNIFE``, ``PISTOL``, and ``RIFLE``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 msgid "``weapons``: A dictionary that will hold all of the weapon nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:938 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 msgid "" "``WEAPON_NUMBER_TO_NAME``: A dictionary allowing us to convert from a " "weapon's number to its name. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:939 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 msgid "" "``WEAPON_NAME_TO_NUMBER``: A dictionary allowing us to convert from a " "weapon's name to its number. We'll use this for changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:940 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 msgid "" "``changing_weapon``: A boolean to track whether or not we are changing guns/" "weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:941 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 msgid "``changing_weapon_name``: The name of the weapon we want to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:942 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 msgid "" "``health``: How much health our player has. In this part of the tutorial we " "will not be using it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:943 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:944 msgid "" "``UI_status_label``: A label to show how much health we have, and how much " "ammo we have both in our gun and in reserves." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:947 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:948 msgid "" "Next we need to add a few things in ``_ready``. Here's the new ``_ready`` " "function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:979 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:980 msgid "Let's go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:981 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:982 msgid "" "First we get the :ref:`AnimationPlayer ` node and " -"assign it to our animation_manager variable. Then we set the callback " +"assign it to the ``animation_manager`` variable. Then we set the callback " "function to a :ref:`FuncRef ` that will call the player's " -"``fire_bullet`` function. Right now we haven't written our fire_bullet " +"``fire_bullet`` function. Right now we haven't written the ``fire_bullet`` " "function, but we'll get there soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:985 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:986 msgid "" "Next we get all of the weapon nodes and assign them to ``weapons``. This " "will allow us to access the weapon nodes only with their name (``KNIFE``, " "``PISTOL``, or ``RIFLE``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:988 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:989 msgid "" -"We then get ``Gun_Aim_Point``'s global position so we can rotate our weapons " -"to aim at it." +"We then get ``Gun_Aim_Point``'s global position so we can rotate the " +"player's weapons to aim at it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:991 msgid "Then we go through each weapon in ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:992 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:993 msgid "" "We first get the weapon node. If the weapon node is not ``null``, we then " -"set it's ``player_node`` variable to ourself. Then we have it look at " -"``gun_aim_point_pos``, and then rotate it by ``180`` degrees on the ``Y`` " -"axis." +"set it's ``player_node`` variable to this script (``Player.gd``). Then we " +"have it look at ``gun_aim_point_pos`` using the ``look_at`` function, and " +"then rotate it by ``180`` degrees on the ``Y`` axis." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:996 msgid "" "We rotate all of those weapon points by ``180`` degrees on their ``Y`` axis " "because our camera is pointing backwards. If we did not rotate all of these " "weapon points by ``180`` degrees, all of the weapons would fire backwards." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:998 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:999 msgid "" "Then we set ``current_weapon_name`` and ``changing_weapon_name`` to " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1001 msgid "Finally, we get the UI :ref:`Label ` from our HUD." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1004 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1005 msgid "" "Lets add a new function call to ``_physics_process`` so we can change " "weapons. Here's the new code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1015 msgid "Now we will call ``process_changing_weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1018 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1019 msgid "" "Now lets add all of the player input code for the weapons in " "``process_input``. Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1058 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1059 msgid "Lets go over the additions, starting with how we're changing weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1060 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1061 msgid "" "First we get the current weapon's number and assign it to " "``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1062 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1063 msgid "" "Then we check to see if any of the number keys (keys 1-4) are pressed. If " "they are, we set ``weapon_change_number`` to the value mapped at that key." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1065 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1066 msgid "" "The reason key 1 is mapped to ``0`` is because the first element in a list " "is mapped to zero, not one. Most list/array accessors in most programming " @@ -25509,149 +25525,153 @@ msgid "" "Zero-based_numbering for more information." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1068 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1069 msgid "" "Next we check to see if ``shift_weapon_positive`` or " "``shift_weapon_negative`` is pressed. If one of them are, we add/subtract " "``1`` from ``weapon_change_number``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1071 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1072 msgid "" -"Because we may have shifted ``weapon_change_number`` outside of the number " -"of weapons we have, we clamp it so it cannot exceed the maximum number of " -"weapons we have and has to be ``0`` or more." +"Because the player may have shifted ``weapon_change_number`` outside of the " +"number of weapons the player has, we clamp it so it cannot exceed the " +"maximum number of weapons the player has and it ensures " +"``weapon_change_number`` is ``0`` or more." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1074 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1075 msgid "" -"Then we check to make sure we are not already changing weapons. If we are " -"not, we then check to see if the weapon we want to change to is a new weapon " -"and not the one we are currently using. If the weapon we're wanting to " -"change to is a new weapon, we then set ``changing_weapon_name`` to the " -"weapon at ``weapon_change_number`` and set ``changing_weapon`` to true." +"Then we check to make sure the player is not already changing weapons. If " +"the player is not, we then check to see if the weapon the player wants to " +"change to is a new weapon and not the weapon the player is currently using. " +"If the weapon the player is wanting to change to is a new weapon, we then " +"set ``changing_weapon_name`` to the weapon at ``weapon_change_number`` and " +"set ``changing_weapon`` to true." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1078 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1079 msgid "" "For firing the weapon we first check to see if the ``fire`` action is " -"pressed. Then we check to make sure we are not changing weapons. Next we get " -"the weapon node for the current weapon." +"pressed. Then we check to make sure the player is not changing weapons. Next " +"we get the weapon node for the current weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1082 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1083 msgid "" -"If the current weapon node does not equal null, and we are in it's " -"``IDLE_ANIM_NAME`` state, we set our animation to the current weapon's " -"``FIRE_ANIM_NAME``." +"If the current weapon node does not equal null, and the player is in it's " +"``IDLE_ANIM_NAME`` state, we set the player's animation to the current " +"weapon's ``FIRE_ANIM_NAME``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1087 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1088 msgid "Lets add ``process_changing_weapons`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1089 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1090 msgid "Add the following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1125 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1126 msgid "Lets go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1127 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1128 msgid "" -"The first thing we do is make sure we've recived input to change weapons. We " +"The first thing we do is make sure we've revived input to change weapons. We " "do this by making sure ``changing_weapons`` is ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1129 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1130 msgid "" "Next we define a variable (``weapon_unequipped``) so we can check whether " "the current weapon has been successfully unequipped or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1131 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1132 msgid "Then we get the current weapon from ``weapons``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1133 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1134 msgid "" "If the current weapon is not ``null``, then we have need to check to see if " "the weapon is enabled or not. If the weapon is enabled, we call it's " "``unequip_weapon`` function so it will start the unequip animation. If the " -"weapon is not enabled, we set ``weapon_unequippped`` to ``true``, because we " -"the weapon has successfully been unequipped." +"weapon is not enabled, we set ``weapon_unequippped`` to ``true`` because the " +"weapon has successfully been unequipped." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1136 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1137 msgid "" "If the current weapon is ``null``, then we can simply set " "``weapon_unequipped`` to ``true``. The reason we do this check is because " "there is no weapon script/node for ``UNARMED``, but there is also no " -"animations for ``UNARMED``, so we can just start equipping the weapon we " -"want to change to." +"animations for ``UNARMED``, so we can just start equipping the weapon the " +"player wants to change to." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1139 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1140 msgid "" -"If we have successfully unequipped the current weapon (``weapon_unequipped " -"== true``), we need to equip the new weapon." +"If the player has successfully unequipped the current weapon " +"(``weapon_unequipped == true``), we need to equip the new weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1141 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1142 msgid "" -"First we define a new variable (``weapon_equipped``) for tracking whether we " -"have successfully equipped the new weapon or not." +"First we define a new variable (``weapon_equipped``) for tracking whether " +"the player has successfully equipped the new weapon or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1143 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1144 msgid "" -"Then we get the weapon we want to change to. If the weapon we want to change " -"to is not ``null``, we then check to see whether or not it's enabled. If it " -"is not enabled, we call it's ``equip_weapon`` function so it starts to equip " -"the weapon. If the weapon is enabled, we set ``weapon_equipped`` to ``true``." +"Then we get the weapon the player wants to change to. If the weapon the " +"player wants to change to is not ``null``, we then check to see whether or " +"not it's enabled. If it is not enabled, we call it's ``equip_weapon`` " +"function so it starts to equip the weapon. If the weapon is enabled, we set " +"``weapon_equipped`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1146 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1147 msgid "" -"If the weapon we want to change to is ``null``, we simply set " +"If the weapon the player wants to change to is ``null``, we simply set " "``weapon_equipped`` to ``true`` because we do not have any node/script for " "``UNARMED``, nor do we have any animations." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1148 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1150 msgid "" -"Finally, we check to see if we have successfully equipped the new weapon. If " -"we have, we set ``changing_weapon`` to false because we are no longer " -"changing weapons. We also set ``current_weapon_name`` to " -"``changing_weapon_name``, since the current weapon has changed, and then we " -"set ``changing_weapon_name`` to a empty string." +"Finally, we check to see if the player has successfully equipped the new " +"weapon. If the player has, we set ``changing_weapon`` to ``false`` because " +"the player is no longer changing weapons. We also set " +"``current_weapon_name`` to ``changing_weapon_name``, since the current " +"weapon has changed, and then we set ``changing_weapon_name`` to a empty " +"string." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1153 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1156 msgid "" "Now, we need to add one more function to the player, and then the player is " -"ready to start the weapons!" +"ready to start firing the weapons!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1155 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1158 msgid "" "We need to add ``fire_bullet``, which will be called when by the :ref:" "`AnimationPlayer ` at those points we set earlier in " "the :ref:`AnimationPlayer ` function track:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1167 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1170 msgid "Lets go over what this function is doing:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1169 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1172 msgid "" -"First we check if we are changing weapons or not. If we are changing " -"weapons, we do not want shoot so we ``return``." +"First we check if to see if the player is changing weapons or not. If the " +"player is changing weapons, we do not want shoot so we ``return``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1171 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1174 msgid "" "Calling ``return`` stops the rest of the function from being called. In this " "case, we are not returning a variable because we are only interested in not " @@ -25659,114 +25679,130 @@ msgid "" "variable either when we call this function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1175 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1178 msgid "" -"Then we tell the current weapon we are using to fire by calling its " +"Then we tell the current weapon the player is using to fire by calling its " "``fire_weapon`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1177 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1180 msgid "" "Remember how we mentioned the speed of the animations for firing was faster " "than the other animations? By changing the firing animation speeds, you can " "change how fast the weapon fires bullets!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1183 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 msgid "" "Before we are ready to test our new weapons, we still have a little bit of " "work to do." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1186 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1189 msgid "Creating some test subjects" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1188 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 msgid "" "Create a new script by going to the scripting window, clicking \"file\", and " "selecting new. Name this script ``RigidBody_hit_test`` and make sure it " "extends :ref:`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1191 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1194 msgid "Now we need to add this code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1207 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1211 msgid "Lets go over how ``bullet_hit`` works:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1209 -msgid "" -"First we get the direction from the bullet pointing towards our global :ref:" -"`Transform `. We do this by subtracting the bullet's hit " -"position from the :ref:`RigidBody `'s position. This " -"results in a :ref:`Vector3 ` that we can use to tell the " -"direction the bullet collided into the :ref:`RigidBody ` at." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1214 msgid "" -"We then normalize it so we do not get crazy results from collisions on the " -"extremes of the collision shape attached to the :ref:`RigidBody " -"`. Without normalizing shots farther away from the center " -"of the :ref:`RigidBody ` would cause a more noticeable " -"reaction than those closer to the center." +"First we get the bullet's forward directional vector. This is so we can tell " +"which direction the bullet will hit the :ref:`RigidBody ` " +"at. We will use this to push the :ref:`RigidBody ` in the " +"same direction as the bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1219 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1217 msgid "" -"Finally, we apply an impulse at the passed in bullet collision position. " -"With the force being the directional vector times the damage the bullet is " -"supposed to cause. This makes the :ref:`RigidBody ` seem to " -"move in response to the bullet colliding into it." +"We need to boost the directional vector by ``BASE_BULLET_BOOST`` so the " +"bullet's back a bit more of a punch and move the :ref:`RigidBody " +"` nodes in a visible way. You can just " +"``BASE_BULLET_BOOST`` to lower or higher values if you want less or more of " +"a reaction when the bullets collide with the :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1225 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1221 +msgid "Then we apply a impulse using ``apply_impulse``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1223 +msgid "" +"First, we need to calculate the position for the impulse. Because " +"``apply_impulse`` takes a vector relative to the :ref:`RigidBody " +"`, we need to calculate the distance from the :ref:" +"`RigidBody ` to the bullet. We do this by subtracting the :" +"ref:`RigidBody `'s global origin/position from the bullet's " +"global origin/position. This gets us the distance from the :ref:`RigidBody " +"` to the bullet. We normalize this vector so the size of " +"the collider does not effect how much the bullets move the :ref:`RigidBody " +"`." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +msgid "" +"Finally, we need to calculate the force for the impulse. For this we use the " +"bullet is facing and multiply it by the bullet's damage. This gives a nice " +"result and for stronger bullets, we get a stronger result." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1234 msgid "" "Now we need to attach this script to all of the :ref:`RigidBody " "` nodes we want to effect." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1227 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1236 msgid "" "Open up ``Testing_Area.tscn`` and select all of the cubes parented to the " "``Cubes`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1229 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1238 msgid "" "If you select the top cube, and then hold down ``shift`` and select the last " "cube, Godot will select all of the cubes in between!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1232 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1241 msgid "" "Once you have all of the cubes selected, scroll down in the inspector until " "you get to the the \"scripts\" section. Click the drop down and select \"Load" "\". Open your newly created ``RigidBody_hit_test.gd`` script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1240 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 msgid "" "That was a lot of code! But now with all that done you can go give your " "weapons a test!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1242 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1251 msgid "" "You should now be able to fire as many bullets as you want on the cubes and " "they will move in response to the bullets colliding into them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1245 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1254 msgid "" "In :ref:`doc_fps_tutorial_part_three`, we will add ammo to the weapons, as " "well as some sounds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1249 +#: ../../docs/tutorials/3d/fps_tutorial/part_two.rst:1258 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_2.zip `" @@ -25778,519 +25814,523 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:9 msgid "" -"In this part we will be limiting our weapons by giving them ammo. We will " -"also be giving the player the ability to reload, and we will be adding " -"sounds when the weapons fire." +"In this part we will be limiting the player's weapons by giving them ammo. " +"We will also be giving the player the ability to reload, and we will be " +"adding sounds when the weapons fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:15 msgid "" -"By the end of this part, the player will have limited ammo, the ability to " -"reload, and sounds will play when the player fires and changes weapons." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:18 -msgid "" "You are assumed to have finished :ref:`doc_fps_tutorial_part_two` before " "moving on to this part of the tutorial." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:20 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:17 msgid "" "The finished project from :ref:`doc_fps_tutorial_part_two` will be the " "starting project for part 3" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:26 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:23 msgid "Changing levels" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:28 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:25 msgid "" "Now that we have a fully working FPS, let's move to a more FPS like level." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:30 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:27 msgid "" "Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level." "tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level." "tscn``)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:29 msgid "" "``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels " "created for the purpose of this tutorial. Press ``F6`` to play the open " "scene, or press the ``play current scene button``, and give it them a whirl." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:32 msgid "" "``Space_Level.tscn`` is more graphically demanding of the GPU than " "``Ruins_Level.tscn``. If your computer is struggling to render ``Space_Level." "tscn``, try using ``Ruins_Level.tscn`` instead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:35 msgid "" "You might have noticed there are several :ref:`RigidBody ` " "nodes placed throughout the level. We can place ``RigidBody_hit_test.gd`` on " "them and then they will react to being hit with bullets, so let's do that!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:41 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:38 msgid "" "Follow the instructions below for either (or both) of the scenes you want to " "use" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 -msgid "Now you can fire at all of the rigid bodies in either level!" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:74 +msgid "" +"Now you can fire at all of the rigid bodies in either level and they will " +"react to bullets hitting them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:80 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:77 msgid "Adding ammo" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:82 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:79 msgid "" -"Now that we've got working guns, let's give them a limited amount of ammo." +"Now that the player has working guns, let's give them a limited amount of " +"ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:84 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:81 msgid "First we need to define a few variables in each of our weapon scripts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:86 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:195 -msgid "Open up ``Weapon_Pistol.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:83 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:192 +msgid "Open up ``Weapon_Pistol.gd`` and add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:94 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:91 msgid "``ammo_in_weapon``: The amount of ammo currently in the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:92 msgid "" "``spare_ammo``: The amount of ammo we have left in reserve for the pistol" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:96 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:93 msgid "``AMMO_IN_MAG``: The amount of ammo in a fully reload weapon/magazine" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:98 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:95 msgid "Now all we need to do is add a single line of code to ``fire_weapon``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:100 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:97 msgid "" "Add the following right under ``Clone.BULLET_DAMAGE = DAMAGE``: " "``ammo_in_weapon -= 1``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:102 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:99 msgid "" -"This will remove one from ``ammo_in_weapon`` every time we fire. Notice " -"we're not checking to see if we have ammo count of ``0`` or greater in " -"``fire_weapon``. Instead we're going to check that the ammo count in " -"``Player.gd``." +"This will remove one from ``ammo_in_weapon`` every time the player fires. " +"Notice we're not checking to see if the player has enough ammo or not in " +"``fire_weapon``. Instead we're going to check to see if the player has " +"enough ammo in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:107 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:104 msgid "Now we need to add ammo for both the rifle and the knife." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:106 msgid "" "You may be wondering why we are adding ammo for the knife given it does not " "consume any ammunition. The reason we want to add ammo to the knife is so we " "have a consistent interface for all of our weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:109 msgid "" "If we did not add ammo variables for the knife, we would have to add checks " "for the knife. By adding the ammo variables to the knife, we don't need to " "worry about whether or all our weapons have the same variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:115 -msgid "Add the following global variables to ``Weapon_Rifle.gd``:" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:112 +msgid "Add the following class variables to ``Weapon_Rifle.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:120 +msgid "" +"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " +"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." +"is_colliding()`` check so the player loses ammo regardless of whether the " +"player hit something or not." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:123 msgid "" -"And then add the following to ``fire_weapon``: ``ammo_in_weapon -= 1``. Make " -"sure that ``ammo_in_weapon -= 1`` is outside of the ``if ray." -"is_colliding()`` check so we lost ammo regardless of whether we've hit " -"something or not." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:126 -msgid "" "Now all that's left is the knife. Add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:134 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:131 msgid "" -"And because our knife does not consume ammo, that is all we need to add." +"And because the knife does not consume ammo, that is all we need to add." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:138 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:135 msgid "Now all we need to do is change a one thing in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:140 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:137 msgid "" -"All we need to change how we're firing our weapons in ``process_input``. " +"All we need to change how we're firing the weapons in ``process_input``. " "Change the code for firing weapons to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:155 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:152 msgid "" -"Now our weapons have a limited amount of ammo, and will stop firing when we " -"run out." +"Now the weapons have a limited amount of ammo, and will stop firing when the " +"player runs out." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:159 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:156 msgid "" -"Ideally we'd like to be able to see how much ammo we have left. Let's make a " -"new function called ``process_ui``." +"Ideally we'd like to let the player be able to see how much ammo is left. " +"Let's make a new function called ``process_ui``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:161 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:158 msgid "First, add ``process_UI(delta)`` to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:163 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:160 msgid "Now add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:175 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:237 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:172 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:234 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:162 msgid "Let's go over what's happening:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:174 msgid "" "First we check to see if the current weapon is either ``UNARMED`` or " "``KNIFE``. If it is, we change the ``UI_status_label``'s text to only show " -"our health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." +"the player's health, since ``UNARMED`` and ``KNIFE`` do not consume ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:180 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:177 msgid "" -"If we are using a weapon that does consume ammo, we first get the weapon " +"If the player is using a weapon that consumes ammo, we first get the weapon " "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:182 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:179 msgid "" -"Then change ``UI_status_label``'s text to show our health, how much ammo we " -"have in the weapon, along with how much spare ammo we have for that weapon." +"Then change ``UI_status_label``'s text to show the player's health, along " +"how much ammo the player has in the weapon and how much spare ammo the " +"player has for that weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:183 +msgid "Now we can see how much ammo the player has through the HUD." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:186 -msgid "Now we can see how much ammo we have through the HUD." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:189 msgid "Adding reloading to the weapons" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:191 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:188 msgid "" -"Now that we can run our weapons out of ammo, we need a way to fill them back " -"up. Let's add reloading next!" +"Now that the player can run out of ammo, we need a way to let the player " +"fill them back up. Let's add reloading next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:193 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:190 msgid "" "For reloading we need to add a few more variables and a function to every " "weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:204 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:201 msgid "" "``CAN_RELOAD``: A boolean to track whether this weapon has the ability to " "reload" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:202 msgid "" "``CAN_REFIL``: A boolean to track whether we can refill this weapon's spare " "ammo. We will not be using ``CAN_REFIL`` in this part, but we will in the " "next part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:206 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:203 msgid "" "``RELOADING_ANIM_NAME``: The name of the reloading animation for this weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:208 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:205 msgid "" "Now we need to add a function for handling reloading. Add the following " "function to ``Weapon_Pistol.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:239 -msgid "First we define a variable to see whether or not we can reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:236 +msgid "" +"First we define a variable to see whether or not this weapon can reload." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:238 +msgid "" +"Then we check to see if the player is in this weapon's idle animation state " +"because we only want to be able to reload when the player is not firing, " +"equipping, or unequipping." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:241 msgid "" -"We first check to see if we are in this weapon's idle animation state " -"because we only want to be able to reload when we are not firing. equipping, " -"or unequipping." +"Next we check to see if the player has spare ammo, and if the ammo already " +"in the weapon is equal to a fully reloaded weapon. This way we can assure " +"the player cannot reload when the player has no ammo or when the weapon is " +"already full of ammo." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:244 msgid "" -"Next we check to see if we have spare ammo, and if the ammo already in our " -"weapon is equal to a fully reloaded weapon. This way we can assure we're not " -"going to reload when we have no ammo or when the weapon is already full of " -"ammo." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:247 -msgid "" "If we still can reload, then we calculate the amount of ammo needed to " "reload the weapon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:249 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:246 msgid "" -"If we have enough ammo to fill the weapon, we remove the ammo needed from " -"``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/magazine." +"If the player has enough ammo to fill the weapon, we remove the ammo needed " +"from ``spare_ammo`` and then set ``ammo_in_weapon`` to a full weapon/" +"magazine." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:251 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:248 msgid "" -"If we do not have enough ammo, we add all of the ammo left in " -"``spare_ammo``, then set ``spare_ammo`` to ``0``." +"If the player does not have enough ammo, we add all of the ammo left in " +"``spare_ammo``, and then set ``spare_ammo`` to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:253 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:250 msgid "" "Next we play the reloading animation for this weapon, and then return " "``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:255 -msgid "If we could not reload, we return ``false``." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:252 +msgid "If the player could not reload, we return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:259 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:256 msgid "" "Now we need to add reloading to the rifle. Open up ``Weapon_Rifle.gd`` and " -"add the following global variables:" +"add the following class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:268 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:265 msgid "" "These variables are exactly the same as the pistol, just with " "``RELOADING_ANIM_NAME`` changed to the rifle's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:270 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:267 msgid "Now we need to add ``reload_weapon`` to ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:296 msgid "This code is exactly the same as the pistol." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:300 msgid "" "The last bit we need to do for the weapons is add 'reloading' to the knife. " -"Add the following global variables to ``Weapon_Knife.gd``:" +"Add the following class variables to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:309 msgid "" "Since we both cannot reload or refill a knife, we set both constants to " "``false``. We also define ``RELOADING_ANIM_NAME`` as an empty string, since " "the knife has no reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:315 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:312 msgid "Now we need to add ``reloading_weapon``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:319 msgid "Since we cannot reload a knife, we always return ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:322 msgid "Adding reloading to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:324 msgid "" "Now we need to add a few things to ``Player.gd``. First we need to define a " -"new global variable:" +"new class variable:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:330 +msgid "" +"``reloading_weapon``: A variable to track whether or not the player is " +"currently trying to reload." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:333 -msgid "" -"``reloading_weapon``: A variable to track whether or not we are currently " -"trying to reload." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:336 msgid "Next we need to add another function call to ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:338 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:335 msgid "" "Add ``process_reloading(delta)`` to ``_physics_process``. Now " "``_physics_process`` should look something like this:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:349 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:346 msgid "" "Now we need to add ``process_reloading``. Add the following function to " "``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:360 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:411 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:359 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:419 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:357 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:363 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 msgid "Let's go over what's happening here." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:362 -msgid "First we check to make sure we are trying to reload." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:359 +msgid "First we check to make sure the player is trying to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:361 msgid "" -"If we are, we then get the current weapon. If the current weapon does not " -"equal ``null``, we call its ``reload_weapon`` function." +"If the player is trying to reload, we then get the current weapon. If the " +"current weapon does not equal ``null``, we call its ``reload_weapon`` " +"function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:366 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:363 msgid "" "If the current weapon is equal to ``null``, then the current weapon is " "``UNARMED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:368 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:365 msgid "" "Finally, we set ``reloading_weapon`` to ``false``, because regardless of " -"whether we've successfully reloaded, we've tried reloading and no longer " -"need to keep trying." +"whether the player successfully reloaded, we've tried reloading and no " +"longer need to keep trying." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:370 msgid "" -"Before we can reload, we need to change a few things in ``process_input``." +"Before we can let the player reload, we need to change a few things in " +"``process_input``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:372 msgid "" "The first thing we need to change is in the code for changing weapons. We " "need to add a additional check (``if reloading_weapon == false:``) to see if " -"we are reloading:" +"the player is reloading:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:386 -msgid "This makes it where we cannot change weapons if we are reloading." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:383 +msgid "" +"This makes it where the player cannot change weapons if the player is " +"reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:388 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:385 msgid "" "Now we need to add the code to trigger a reload when the player pushes the " "``reload`` action. Add the following code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:410 msgid "" -"First we make sure we're not reloading already, nor are we trying to change " -"weapons." +"First we make sure the player is not reloading already, nor is the player " +"trying to change weapons." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:412 msgid "Then we check to see if the ``reload`` action has been pressed." msgstr "" +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:414 +msgid "" +"If the player has pressed ``reload``, we then get the current weapon and " +"check to make sure it is not ``null``. Then we check to see if the weapon " +"can reload or not using its ``CAN_RELOAD`` constant." +msgstr "" + #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:417 msgid "" -"If we have pressed ``reload``, we then get the current weapon and check to " -"make sure it is not ``null``. Then we check to see if the weapon can reload " -"or not using its ``CAN_RELOAD`` constant." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:420 -msgid "" "If the weapon can reload, we then get the current animation state, and make " -"a variable for tracking whether we are already reloading or not." +"a variable for tracking whether the player is already reloading or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:422 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:419 msgid "" -"We then go through every weapon to make sure we're not already playing that " -"weapon's reloading animation." +"We then go through every weapon to make sure the player is not already " +"playing that weapon's reloading animation." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:424 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:421 msgid "" -"If we are not reloading with any weapon, we set ``reloading_weapon`` to " -"``true``." +"If the player is not reloading with any weapon, we set ``reloading_weapon`` " +"to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:425 msgid "" "One thing I like to add is where the weapon will reload itself if you try to " -"fire it when it's out of ammo." +"fire it and it's out of ammo." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:427 +msgid "" +"We also need to add a additional if check (``is_reloading_weapon == false:" +"``) so the player cannot fire the current weapon while reloading." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:430 msgid "" -"We also need to add a additional if check (``is_reloading_weapon == false:" -"``) so we cannot fire the current weapon while reloading." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:433 -msgid "" "Let's change our firing code in ``process_input`` so it reloads when trying " "to fire an empty weapon:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:448 msgid "" -"Now we check to make sure we're not reloading before we fire out weapon, and " -"when we have ``0`` or less ammo in our weapon we set ``reloading_weapon`` to " -"``true`` if we try to fire." +"Now we check to make sure the player is not reloading before we fire the " +"weapon, and when we have ``0`` or less ammo in the current weapon we set " +"``reloading_weapon`` to ``true`` if the player tries to fire." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:454 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:451 msgid "" -"This will make it where we will try to reload when we try to fire a empty " -"weapon." +"This will make it where the player will try to reload when the player tries " +"to fire a empty weapon." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:455 +msgid "" +"With that done, the player can now reload! Give it a try! Now you can fire " +"all of the spare ammo for each weapon." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:458 -msgid "" -"With that we can reload our weapons! Give it a try! Now you can fire all of " -"the spare ammo for each weapon." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:461 msgid "Adding sounds" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:460 msgid "" -"Finally, let's add some sounds that play when we are reloading, changing " -"guns, and when we are firing them." +"Finally, let's add some sounds that play when the player is reloading, " +"changing weapons, and when the player is firing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:462 msgid "" "There are no game sounds provided in this tutorial (for legal reasons). " "https://gamesounds.xyz/ is a collection of **\"royalty free or public domain " @@ -26298,28 +26338,28 @@ msgid "" "which can be found in the Sonniss.com GDC 2017 Game Audio Bundle." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:470 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:466 msgid "" "Open up ``SimpleAudioPlayer.tscn``. It is simply a :ref:`Spatial " "` with a :ref:`AudioStreamPlayer ` " "as it's child." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:472 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:468 msgid "" "The reason this is called a 'simple' audio player is because we are not " "taking performance into account and because the code is designed to provide " "sound in the simplest way possible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:475 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:471 msgid "" "If you want to use 3D audio, so it sounds like it's coming from a location " "in 3D space, right click the :ref:`AudioStreamPlayer " "` and select \"Change type\"." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:478 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:474 msgid "" "This will open the node browser. Navigate to :ref:`AudioStreamPlayer3D " "` and select \"change\". In the source for this " @@ -26329,81 +26369,81 @@ msgid "" "code provided below will work regardless of which one you chose." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:479 msgid "" "Create a new script and call it ``SimpleAudioPlayer.gd``. Attach it to the :" "ref:`Spatial ` in ``SimpleAudioPlayer.tscn`` and insert the " "following code:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:534 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:530 msgid "" "By setting ``position`` to ``null`` by default in ``play_sound``, we are " "making it an optional argument, meaning ``position`` doesn't necessarily " "have to be passed in to call the ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:533 #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:236 msgid "Let's go over what's happening here:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:537 msgid "" "In ``_ready`` we get the :ref:`AudioStreamPlayer ` " -"and connect its ``finished`` signal to ourselves. It doesn't matter if it's " -"a :ref:`AudioStreamPlayer ` or :ref:" -"`AudioStreamPlayer3D ` node, as they both have " -"the finished signal. To make sure it is not playing any sounds, we call " +"and connect its ``finished`` signal to the ``destroy_self`` function. It " +"doesn't matter if it's a :ref:`AudioStreamPlayer ` " +"or :ref:`AudioStreamPlayer3D ` node, as they both " +"have the finished signal. To make sure it is not playing any sounds, we call " "``stop`` on the :ref:`AudioStreamPlayer `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:541 msgid "" "Make sure your sound files are **not** set to loop! If it is set to loop the " "sounds will continue to play infinitely and the script will not work!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:544 msgid "" "The ``play_sound`` function is what we will be calling from ``Player.gd``. " -"We check if the sound is one of the three possible sounds, and if it is we " -"set the audio stream for our :ref:`AudioStreamPlayer " +"We check if the sound is one of the three possible sounds, and if it is one " +"of the three sounds we set the audio stream in :ref:`AudioStreamPlayer " "` to the correct sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:548 msgid "" "If it is an unknown sound, we print an error message to the console and free " -"ourselves." +"the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:554 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:550 msgid "" "If you are using a :ref:`AudioStreamPlayer3D `, " "remove the ``#`` to set the position of the audio player node so it plays at " "the correct position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:553 msgid "" "Finally, we tell the :ref:`AudioStreamPlayer ` to " "play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:555 msgid "" "When the :ref:`AudioStreamPlayer ` is finished " "playing the sound, it will call ``destroy_self`` because we connected the " "``finished`` signal in ``_ready``. We stop the :ref:`AudioStreamPlayer " -"` and free ourself to save on resources." +"` and free the audio player to save on resources." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:563 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:559 msgid "This system is extremely simple and has some major flaws:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:565 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:561 msgid "" "One flaw is we have to pass in a string value to play a sound. While it is " "relatively simple to remember the names of the three sounds, it can be " @@ -26412,155 +26452,162 @@ msgid "" "remember the name(s) of each sound effect we want to play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:570 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:566 msgid "" -"Another flaw is we cannot play looping sounds effects, nor background music " +"Another flaw is we cannot play looping sounds effects, nor background music, " "easily with this system. Because we cannot play looping sounds, certain " -"effects like footstep sounds are harder to accomplish because we then have " +"effects, like footstep sounds, are harder to accomplish because we then have " "to keep track of whether or not there is a sound effect and whether or not " "we need to continue playing it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:575 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:571 msgid "" "One of the biggest flaws with this system is we can only play sounds from " "``Player.gd``. Ideally we'd like to be able to play sounds from any script " "at any time." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:580 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:576 msgid "" "With that done, let's open up ``Player.gd`` again. First we need to load the " -"``SimpleAudioPlayer.tscn``. Place the following code in your global " -"variables:" +"``SimpleAudioPlayer.tscn``. Place the following code in the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:583 msgid "" "Now we need to instance the simple audio player when we need it, and then " "call its ``play_sound`` function and pass the name of the sound we want to " -"play. To make the process simpler, let's create a ``create_sound`` function:" +"play. To make the process simpler, let's create a ``create_sound`` function " +"in ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:595 msgid "Lets walk through what this function does:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:603 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:599 msgid "" "The first line instances the ``Simple_Audio_Player.tscn`` scene and assigns " "it to a variable, named ``audio_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:602 msgid "" -"The second line gets the scene root, using one large assumption. We first " -"get this node's :ref:`SceneTree `, and then access the root " -"node, which in this case is the :ref:`Viewport ` this entire " -"game is running under. Then we get the first child of the :ref:`Viewport " -"`, which in our case happens to be the root node in " -"``Test_Area.tscn`` or any of the other provided levels. We are making a huge " -"assumption that the first child of the root is the root node that our player " -"is under, which could not always be the case." +"The second line gets the scene root, and this has a large (though safe) " +"assumption." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:612 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:604 +msgid "" +"We first get this node's :ref:`SceneTree `, and then access " +"the root node, which in this case is the :ref:`Viewport ` " +"this entire game is running under. Then we get the first child of the :ref:" +"`Viewport `, which in our case happens to be the root node " +"in ``Test_Area.tscn`` or any of the other provided levels. **We are making a " +"huge assumption that the first child of the root node is the root scene that " +"the player is under, which may not always be the case**." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:610 msgid "" "If this doesn't make sense to you, don't worry too much about it. The second " -"line of code only doesn't work reliably if you have multiple scenes loaded " +"line of code only does not work reliably if you have multiple scenes loaded " "as children to the root node at a time, which will rarely happen for most " -"projects. This is only potentially a issue depending on how you handle scene " -"loading." +"projects and will not be happening in this tutorial series. This is only " +"potentially a issue depending on how you handle scene loading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:616 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:614 msgid "" "The third line adds our newly created ``SimpleAudioPlayer`` scene to be a " "child of the scene root. This works exactly the same as when we are spawning " "bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:619 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:617 msgid "" -"Finally, we call the ``play_sound`` function and pass in the arguments we're " -"given. This will call ``SimpleAudioPlayer.gd``'s ``play_sound`` function " -"with the passed in arguments." +"Finally, we call the ``play_sound`` function and pass in the arguments " +"passed in to ``create_sound``. This will call ``SimpleAudioPlayer.gd``'s " +"``play_sound`` function with the passed in arguments." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:622 msgid "" "Now all that is left is playing the sounds when we want to. Let's add sound " "to the pistol first!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:624 msgid "Open up ``Weapon_Pistol.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:628 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:626 msgid "" -"Now, we want to make a noise when we fire the pistol, so add the following " -"to the end of the ``fire_weapon`` function:" +"Now, we want to make a noise when the player fires the pistol, so add the " +"following to the end of the ``fire_weapon`` function:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:632 +msgid "" +"Now when the player fires the pistol, we'll play the ``pistol_shot`` sound." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:634 -msgid "Now when we fire our pistol, we'll play the ``pistol_shot`` sound." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:636 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:658 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 msgid "" -"To make a sound when we reload, we need to add the following right under " -"``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` in the " -"``reload_weapon`` function:" +"To make a sound when the player reloads, we need to add the following right " +"under ``player_node.animation_manager.set_animation(RELOADING_ANIM_NAME)`` " +"in the ``reload_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:643 -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:665 -msgid "Now when we reload we'll play the ``gun_cock`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:641 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:663 +msgid "Now when the player reloads, we'll play the ``gun_cock`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:647 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:645 msgid "Now let's add sounds to the rifle. Open up ``Weapon_Rifle.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:650 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:648 msgid "" "To play sounds when the rifle is fired, add the following to the end of the " "``fire_weapon`` function:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:656 -msgid "Now when we fire our rifle, we'll play the ``rifle_shot`` sound." +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:654 +msgid "" +"Now when the player fires the rifle, we'll play the ``rifle_shot`` sound." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:670 msgid "" "Now you have weapons with limited ammo that play sounds when you fire them!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:674 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:672 msgid "" "At this point we have all of the basics of a FPS working. There's still a " "few things that would be nice to add, and we're going to add them in the " "next three parts!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:675 msgid "" "For example, right now we have no way to add ammo to our spares, so we'll " "eventually run out. Also, we don't have anything to shoot at outside of the :" "ref:`RigidBody ` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:680 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:678 msgid "" "In In :ref:`doc_fps_tutorial_part_four` we'll add some targets to shoot at, " "along with some health and ammo pick ups! We're also going to add joypad " "support, so we can play with wired Xbox 360 controllers!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_three.rst:683 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_3.zip `" @@ -26572,9 +26619,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:9 msgid "" -"In this part we will be adding health pick ups, ammo pick ups, targets we " -"can destroy, add support for joypads, and add the ability to change weapons " -"with the scroll wheel." +"In this part we will be adding health pick ups, ammo pick ups, targets the " +"player can destroy, support for joypads, and add the ability to change " +"weapons with the scroll wheel." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:13 @@ -26597,7 +26644,7 @@ msgstr "" msgid "" "In Godot any game controller is referred to as a joypad. This includes: " "Console controllers, Joysticks (like for flight simulators), Wheels (like " -"for driving simulators), VR Controllers, and more." +"for driving simulators), VR Controllers, and more!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:25 @@ -26661,8 +26708,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:49 msgid "" -"First, we need to define a few new global variables. Add the following " -"global variables to ``Player.gd``:" +"First, we need to define a few new class variables. Add the following class " +"variables to ``Player.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:57 @@ -26671,8 +26718,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:59 msgid "" -"``JOYPAD_SENSITIVITY``: This is how fast our joypad joysticks will move our " -"camera." +"``JOYPAD_SENSITIVITY``: This is how fast the joypad's joysticks will move " +"the camera." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:60 @@ -26685,7 +26732,7 @@ msgstr "" msgid "" "Many joypads jitter around a certain point. To counter this, we ignore any " "movement in a with a radius of JOYPAD_DEADZONE. If we did not ignore said " -"movement, the camera will jitter." +"movement, the camera would jitter." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:65 @@ -26716,7 +26763,7 @@ msgstr "" msgid "" "If there is a joypad connected, we then get its left stick axes for right/" "left and up/down. Because a wired Xbox 360 controller has different joystick " -"axis mapping based on OS, we use different axes based on the OS." +"axis mapping based on OS, we will use different axes based on the OS." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:102 @@ -26724,7 +26771,7 @@ msgid "" "This tutorial assumes you are using a XBox 360 wired controller. Also, I do " "not (currently) have access to a Mac computer, so the joystick axes may need " "changing. If they do, please open a GitHub issue on the Godot documentation " -"repository!" +"repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:106 @@ -26756,8 +26803,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:117 msgid "" "Remember how we normalize ``input_movement_vector``? This is why! If we did " -"not normalize ``input_movement_vector`` players could move faster if they " -"are pushing in the same direction with both their keyboard and their joypad!" +"not normalize ``input_movement_vector``, the player could move faster if the " +"player pushes in the same direction with both the keyboard and the joypad!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:122 @@ -26782,7 +26829,7 @@ msgstr "" msgid "" "As stated above, I do not (currently) has access to a Mac computer, so the " "joystick axes may need changing. If they do, please open a GitHub issue on " -"the Godot documentation repository!" +"the Godot documentation repository! Thanks!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:172 @@ -26793,13 +26840,13 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:174 msgid "" -"Then we rotate ``rotation_helper`` and our KinematicBody using " -"``joypad_vec``." +"Then we rotate ``rotation_helper`` and the player's :ref:`KinematicBody " +"` using ``joypad_vec``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:176 msgid "" -"Notice how the code that handles rotating ourselves and ``rotation_helper`` " +"Notice how the code that handles rotating the player and ``rotation_helper`` " "is exactly the same as the code in ``_input``. All we've done is change the " "values to use ``joypad_vec`` and ``JOYPAD_SENSITIVITY``." msgstr "" @@ -26808,16 +26855,18 @@ msgstr "" msgid "" "Due to few mouse related bugs on Windows, we cannot put mouse rotation in " "``process_view`` as well. Once these bugs are fixed, this will likely be " -"updated to place the mouse rotation here as well." +"updated to place the mouse rotation here in ``process_view_input`` as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:182 -msgid "Finally, we clamp the camera's rotation so we cannot look upside down." +msgid "" +"Finally, we clamp the camera's rotation so the player cannot look upside " +"down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:186 msgid "" -"The last thing you need to do is add ``process_view_input`` to " +"The last thing we need to do is add ``process_view_input`` to " "``_physics_process``." msgstr "" @@ -26830,17 +26879,16 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:190 msgid "" "I decided not to use the joypad triggers for firing because we'd then have " -"to do some more axis managing, and because I prefer to use a shoulder button " -"to fire." +"to do some more axis managing, and because I prefer to use a shoulder " +"buttons to fire." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:192 msgid "" "If you want to use the triggers for firing, you will need to change how " -"firing works in ``process_input``. You need to get the proper axis value for " -"the trigger, and check if it's over a certain value, say ``0.8`` for " -"example. If it is, you add the same code as when the ``fire`` action was " -"pressed." +"firing works in ``process_input``. You need to get the axis values for the " +"triggers, and check if it's over a certain value, say ``0.8`` for example. " +"If it is, you add the same code as when the ``fire`` action was pressed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:196 @@ -26849,15 +26897,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:198 msgid "" -"Let's add one input related feature before we start working on the pick ups " -"and target. Let's add the ability to change weapons using the scroll wheel " -"on the mouse." +"Let's add one more input related feature before we start working on the pick " +"ups and the target. Let's add the ability to change weapons using the scroll " +"wheel on the mouse." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:200 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:507 -msgid "Open up ``Player.gd`` and add the following global variables:" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:458 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:511 +msgid "Open up ``Player.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:207 @@ -26881,7 +26929,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:238 msgid "" "First we check if the event is a ``InputEventMouseButton`` event and that " -"our mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " +"the mouse mode is ``MOUSE_MODE_CAPTURED``. Then we check to see if the " "button index is either a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index." msgstr "" @@ -26889,20 +26937,21 @@ msgstr "" msgid "" "If the event's index is indeed a button wheel index, we then check to see if " "it is a ``BUTTON_WHEEL_UP`` or ``BUTTON_WHEEL_DOWN`` index. Based on whether " -"it is up or down we add/remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " +"it is up or down we add or remove ``MOUSE_SENSITIVITY_SCROLL_WHEEL`` to/from " "``mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:244 msgid "" -"Next we clamp mouse scroll value to assure it is inside the range of our " -"weapons." +"Next we clamp mouse scroll value to assure it is inside the range of " +"selectable weapons." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:246 msgid "" -"We then check to see if we are changing weapons or reloading. If we are " -"doing neither, we round ``mouse_scroll_value`` and cast it to a ``int``." +"We then check to see if the player is changing weapons or reloading. If the " +"player is doing neither, we round ``mouse_scroll_value`` and cast it to a " +"``int``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:248 @@ -26916,10 +26965,10 @@ msgstr "" msgid "" "Next we check to see if the weapon name at ``round_mouse_scroll_value`` is " "not equal to the current weapon name using ``weapon_number_to_name``. If the " -"weapon is different than our current weapon, we assign " -"``changing_weapon_name``, set ``changing_weapon`` to true so we will change " -"weapons in ``process_changing_weapon``, and set ``mouse_scroll_value`` to " -"``round_mouse_scroll_value``." +"weapon is different than the player's current weapon, we assign " +"``changing_weapon_name``, set ``changing_weapon`` to ``true`` so the player " +"will change weapons in ``process_changing_weapon``, and set " +"``mouse_scroll_value`` to ``round_mouse_scroll_value``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:255 @@ -26940,8 +26989,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:267 msgid "" -"Now our scroll value we be changed with the keyboard input. If we did not " -"change this, our scroll value will be out of sync. If the scroll wheel is " +"Now the scroll value will be changed with the keyboard input. If we did not " +"change this, the scroll value will be out of sync. If the scroll wheel is " "out of sync, scrolling forwards or backwards would not transition to the " "next/last weapon, but rather the next/last weapon the scroll wheel changed " "to." @@ -26957,7 +27006,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:277 msgid "" -"Now that our player has health and ammo, we ideally need a way to replenish " +"Now that the player has health and ammo, we ideally need a way to replenish " "those resources." msgstr "" @@ -27005,7 +27054,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:351 msgid "" -"Let's go over what this script is doing, starting with its global variables:" +"Let's go over what this script is doing, starting with its class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:353 @@ -27047,10 +27096,10 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:363 msgid "" -"Also, notice how we're using a exported variable. This is so we can change " -"the size of the health pick up in the editor, for each pick up. This makes " -"it where we do not have to make two scenes for the two sizes, since we can " -"easily change sizes in the editor using the exported variable." +"Also, notice how we are using a exported variable. This is so we can change " +"the size of the health pick ups in the editor. This makes it where we do not " +"have to make two scenes for the two sizes, since we can easily change sizes " +"in the editor using the exported variable." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:366 @@ -27065,7 +27114,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:372 msgid "" -"First we connect the ``body_entered`` signal from our " +"First we connect the ``body_entered`` signal from the " "``Health_Pickup_Trigger`` to the ``trigger_body_entered`` function. This " "makes is where any body that enters the :ref:`Area ` triggers " "the ``trigger_body_entered`` function." @@ -27073,7 +27122,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:375 msgid "" -"Next we set ``is_ready`` to ``true`` so we can use our ``setget`` function." +"Next we set ``is_ready`` to ``true`` so we can use the ``setget`` function." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:377 @@ -27101,8 +27150,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:388 msgid "" -"If ``is_ready`` is ``true``, we then make whatever kit is currently assigned " -"to ``kit_size`` disabled using ``kit_size_change_values``, passing in " +"If ``is_ready`` is ``true``, we then make whatever kit already assigned to " +"``kit_size`` disabled using ``kit_size_change_values``, passing in " "``kit_size`` and ``false``." msgstr "" @@ -27111,7 +27160,7 @@ msgid "" "Then we assign ``kit_size`` to the new value passed in, ``value``. Then we " "call ``kit_size_change_values`` passing in ``kit_size`` again, but this time " "with the second argument as ``true`` so we enable it. Because we changed " -"``kit_size`` to the passed in value, this will make whatever kit size we " +"``kit_size`` to the passed in value, this will make whatever kit size was " "passed in visible." msgstr "" @@ -27127,8 +27176,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:399 msgid "" -"The first thing we do is check to see which size we're using. Based on which " -"size we're wanting to enable/disable, we want to get different nodes." +"The first thing we do is check to see which size was passed in. Based on " +"which size we're wanting to enable/disable, we want to get different nodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:401 @@ -27173,20 +27222,20 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:419 msgid "" -"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so we have to wait before " -"we can get health again. Finally, call ``kit_size_change_values``, passing " -"in ``kit_size`` and ``false`` so the kit at ``kit_size`` is invisible until " -"we've waited long enough to respawn." +"Then we set ``respawn_timer`` to ``RESPAWN_TIME`` so the player has to wait " +"before the player can get health again. Finally, call " +"``kit_size_change_values``, passing in ``kit_size`` and ``false`` so the kit " +"at ``kit_size`` is invisible until it has waited long enough to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:424 msgid "" -"The last thing we need to do before we can use this health pick up is add a " -"few things to our player." +"The last thing we need to do before the player can use this health pick up " +"is add a few things to ``Player.gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:426 -msgid "Open up ``Player.gd`` and add the following global variable:" +msgid "Open up ``Player.gd`` and add the following class variable:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:432 @@ -27195,7 +27244,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:434 msgid "" -"Now we need to add the ``add_health`` function to our player. Add the " +"Now we need to add the ``add_health`` function to the player. Add the " "following to ``Player.gd``:" msgstr "" @@ -27205,17 +27254,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:444 msgid "" -"We first add ``additional_health`` to our current health. We then clamp the " -"health so that it cannot exceed a value higher than ``MAX_HEALTH``, nor a " -"value lower than ``0``." +"We first add ``additional_health`` to the player's current health. We then " +"clamp the health so that it cannot exceed a value higher than " +"``MAX_HEALTH``, nor a value lower than ``0``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:449 msgid "" -"With that done, now we can collect health! Go place a few ``Health_Pickup`` " -"scenes around and give it a try. You can change the size of the health pick " -"up in the editor when a ``Health_Pickup`` instanced scene is selected, from " -"a convenient drop down." +"With that done, the player can now collect health! Go place a few " +"``Health_Pickup`` scenes around and give it a try. You can change the size " +"of the health pick up in the editor when a ``Health_Pickup`` instanced scene " +"is selected, from a convenient drop down." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:453 @@ -27224,8 +27273,9 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:455 msgid "" -"While adding health is good and all, we can't reap the rewards from it since " -"nothing can (currently) damage us. Let's add some ammo pick ups next!" +"While adding health is good and all, we can't reap the rewards from adding " +"it since nothing can (currently) damage us. Let's add some ammo pick ups " +"next!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:458 @@ -27250,42 +27300,44 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:525 msgid "" -"First, notice how we have ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " -"``AMMO_AMOUNTS`` will be how many ammo clips/magazines we add to the current " -"weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health points, we " -"instead add an entire clip for the current weapon, instead of the raw ammo " -"amount)" +"First, notice how there is ``AMMO_AMOUNTS`` instead of ``HEALTH_AMMOUNTS``. " +"``AMMO_AMOUNTS`` will be how many ammo clips/magazines the pick up add to " +"the current weapon. (Unlike ``HEALTH_AMMOUNTS`` which was how many health " +"points, we instead add an entire clip for the current weapon, instead of the " +"raw ammo amount)" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:528 msgid "" -"The only other thing to notice is in ``trigger_body_entered`` we're checking " -"and calling a function called ``add_ammo``, not ``add_health``." +"The only other thing to notice is in ``trigger_body_entered``. We're " +"checking and calling a function called ``add_ammo`` instead of " +"``add_health``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:530 msgid "" "Other than those two small changes, everything else is exactly the same as " -"the health pickup!" +"the health pick up!" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:534 msgid "" -"All we need to do make the ammo pick ups work is add a new function to our " +"All we need to do make the ammo pick ups work is add a new function to the " "player. Open ``Player.gd`` and add the following function:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:543 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:734 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:739 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:924 msgid "Let's go over what this function does." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:545 msgid "" -"The first thing we check is to see whether we're using ``UNARMED`` or not. " -"Because ``UNARMED`` does not have a node/script, we want to make sure we're " -"not using ``UNARMED`` before trying to get the node/script attached to " -"``current_weapon_name``." +"The first thing we check is to see whether the player is using ``UNARMED`` " +"or not. Because ``UNARMED`` does not have a node/script, we want to make " +"sure the player is not using ``UNARMED`` before trying to get the node/" +"script attached to ``current_weapon_name``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:548 @@ -27358,15 +27410,15 @@ msgstr "" msgid "" "While you still have ``Broken_Target.tscn`` open, attach " "``RigidBody_hit_test.gd`` to all of the :ref:`RigidBody ` " -"nodes. This will make it where we can shoot at the broken pieces and they " -"will react to the bullets." +"nodes. This will make it where the player can shoot at the broken pieces and " +"they will react to the bullets." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:581 msgid "" "Alright, now switch back to ``Target.tscn``, select the ``Target`` :ref:" -"`StaticBody ` node and created a new script called " -"``Target.gd``." +"`StaticBody ` node and create a new script called ``Target." +"gd``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:583 @@ -27374,8 +27426,7 @@ msgid "Add the following code to ``Target.gd``:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:641 -msgid "" -"Let's go over what this script does, starting with the global variables:" +msgid "Let's go over what this script does, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:643 @@ -27420,12 +27471,12 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:651 msgid "" -"Notice how we're using an exported variable (a :ref:`PackedScene " +"Notice how we're using a exported variable (a :ref:`PackedScene " "`) to get the broken target scene instead of using " "``preload``. By using an exported variable, we can chose the scene from the " -"editor, and when/if we need to use a different scene, it's as easy as " -"selecting a different scene in the editor, we don't need to go to the code " -"to change the scene we're using." +"editor, and if we need to use a different scene, it's as easy as selecting a " +"different scene in the editor, we don't need to go to the code to change the " +"scene we're using." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:657 @@ -27476,51 +27527,53 @@ msgstr "" msgid "" "Then we check to see if ``target_respawn_timer`` is ``0`` or less. The " "reason behind this is since we just removed ``delta`` from " -"``target_respawn_timer``, if it's ``0`` or less then we've just got here, " -"effectively allowing us to do whatever we need to do when the timer is " +"``target_respawn_timer``, if it's ``0`` or less then the target just got " +"here, effectively allowing us to do whatever we need to do when the timer is " "finished." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:680 -msgid "In this case, we want to respawn our target." +msgid "In this case, we want to respawn the target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:682 msgid "" "The first thing we do is remove all children in the broken target holder. We " "do this by iterating over all of the children in ``broken_target_holder`` " -"and free them." +"and free them using ``queue_free``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:684 msgid "" -"Next we enable our collision shape by setting its ``disabled`` boolean to " +"Next we enable the collision shape by setting its ``disabled`` boolean to " "``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:686 -msgid "Then we make ourselves, and all of our children nodes, visible." +msgid "Then we make the target, and all of it's children nodes, visible again." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:688 -msgid "Finally, we reset ``current_health`` to ``TARGET_HEALTH``." +msgid "" +"Finally, we reset the target's health (``current_health``) to " +"``TARGET_HEALTH``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:692 -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:904 msgid "Finally, let's look at ``bullet_hit``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:694 msgid "" -"The first the we do is remove however much damage the bullet does from our " -"health." +"The first the we do is remove however much damage the bullet does from the " +"target's health." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:696 msgid "" -"Next we check to see if we're at ``0`` health or lower. If we are, then " -"we've just died and need to spawn a broken target." +"Next we check to see if the target is at ``0`` health or lower. If it is, " +"the target has just died and we need to spawn a broken target." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:698 @@ -27530,23 +27583,23 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:700 -msgid "Next we add ``clone`` as a child of our broken target holder." +msgid "Next we add ``clone`` as a child of the broken target holder." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:702 msgid "" -"For an added bonus, we want to make all of the target pieces explode " -"outwards. Do to this, we iterate over all of the children in ``clone``." +"For bonus effect, we want to make all of the target pieces explode outwards. " +"To do this, we iterate over all of the children in ``clone``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:704 msgid "" "For each child, we first check to see if it's a :ref:`RigidBody " "` node. If it is, we then calculate the center position of " -"the target relative to the child node. Then we figure out which direction we " -"are relative to the center. Using those calculated variables, we push the " -"child from the calculated center, in the direction away from the center, " -"using the damage of the bullet as the force." +"the target relative to the child node. Then we figure out which direction " +"the child node is relative to the center. Using those calculated variables, " +"we push the child from the calculated center, in the direction away from the " +"center, using the damage of the bullet as the force." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:708 @@ -27558,15 +27611,15 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:711 msgid "" -"Next we set our respawn timer for our non-broken target. We set it to " -"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds to " -"respawn." +"Next we set the target's respawn timer. We set the timer to " +"``TARGET_RESPAWN_TIME``, so it takes ``TARGET_RESPAWN_TIME`` many seconds " +"for the target to respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:713 msgid "" -"Then we disable the non-broken target's collision shape, and set our " -"visibility to ``false``." +"Then we disable the non-broken target's collision shape, and set the " +"target's visibility to ``false``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_four.rst:717 @@ -27609,7 +27662,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:9 msgid "" -"In this part we're going to add grenades to our player, give our player the " +"In this part we're going to add grenades to the player, give the player the " "ability to grab and throw objects, and add turrets!" msgstr "" @@ -27631,48 +27684,48 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:22 msgid "" -"First, let's give our player some grenades to play with. Open up ``Grenade." +"First, let's give the player some grenades to play with. Open up ``Grenade." "tscn``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:24 msgid "" -"There's a few things to note here, the first and foremost being that our " +"There's a few things to note here, the first and foremost being that the " "grenades are going to use :ref:`RigidBody ` nodes. We're " "going to use :ref:`RigidBody ` nodes for our grenades so " -"they bounce around the world in a somewhat realistic manner." +"they bounce around the world in a (somewhat) realistic manner." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:27 msgid "" "The second thing to note is ``Blast_Area``. This is a :ref:`Area " -"` node that will represent the blast radius of our grenade." +"` node that will represent the blast radius of the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:29 msgid "" "Finally, the last thing to note is ``Explosion``. This is the :ref:" "`Particles ` node that will emit an explosion effect when " -"the grenades explodes. One thing to note here is that we have ``One shot`` " -"enabled. This is so we emit all of our particles at once. We're also " -"emitting in world coordinates instead of local coordinates, so we have " -"``Local Coords`` unchecked as well." +"the grenade explodes. One thing to note here is that we have ``One shot`` " +"enabled. This is so we emit all of the particles at once. The particles are " +"also emitting using world coordinates instead of local coordinates, so we " +"have ``Local Coords`` unchecked as well." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:33 msgid "" -"If you want you can see how the particles are set up by looking through it's " -"``Process Material`` and ``Draw Passes``." +"If you want, you can see how the particles are set up by looking through the " +"particle's ``Process Material`` and ``Draw Passes``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:35 msgid "" -"Let's write the code needed for our grenade. Select ``Grenade`` and make a " +"Let's write the code needed for the grenade. Select ``Grenade`` and make a " "new script called ``Grenade.gd``. Add the following:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:91 -msgid "Let's go over what's happening, starting with the global variables:" +msgid "Let's go over what's happening, starting with the class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:93 @@ -27731,11 +27784,11 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:103 msgid "" "Notice how ``EXPLOSION_WAIT_TIME`` is a rather strange number (``0.48``). " -"This is because we want ``EXPLOSION_WAIT_TIME`` to be the length of time the " -"particles are emitting, so when the particles are done we destroy/free the " -"grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the particle's life " -"time and dividing it by the particle's speed scale. This gets us the exact " -"time the explosion particles will last." +"This is because we want ``EXPLOSION_WAIT_TIME`` to be equal to the length of " +"time the explosion particles are emitting, so when the particles are done we " +"destroy/free the grenade. We calculate ``EXPLOSION_WAIT_TIME`` by taking the " +"particle's life time and dividing it by the particle's speed scale. This " +"gets us the exact time the explosion particles will last." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:109 @@ -27744,8 +27797,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:111 msgid "" -"First we get all of the nodes we'll need and assign them to the proper " -"global variables." +"First we get all of the nodes we'll need and assign them to the proper class " +"variables." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:113 @@ -27759,16 +27812,17 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:116 msgid "" "The reason we need to get the blast :ref:`Area ` is so we can " -"damage everything inside it when it explodes. We'll be using code similar to " -"the knife weapon in our player. We need the :ref:`Particles " -"` so we can emit them when we explode." +"damage everything inside it when the grenade explodes. We'll be using code " +"similar to the knife code in the player. We need the :ref:`Particles " +"` so we can emit particles when the grenade explodes." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:119 msgid "" -"After we get all of the nodes and assign them to their global variables, we " +"After we get all of the nodes and assign them to their class variables, we " "then make sure the explosion particles are not emitting, and that they are " -"set to emit in one shot." +"set to emit in one shot. This is to be extra sure the particles will behave " +"the way we expect them to." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:124 @@ -27778,26 +27832,26 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:126 msgid "" "First we check to see if the ``grenade_timer`` is less than " -"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so we have " -"to wait ``GRENADE_TIME`` seconds, allowing our :ref:`RigidBody " -"` to move around." +"``GRENADE_TIMER``. If it is, we add ``delta`` and return. This is so the " +"grenade has to wait ``GRENADE_TIME`` seconds, before exploding, allowing " +"the :ref:`RigidBody ` to move around." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:129 msgid "" "If ``grenade_timer`` is at ``GRENADE_TIMER`` or higher, we then need to " -"check if we waited long enough and need to explode. We do this by checking " -"to see if ``explosion_wait_timer`` is equal to ``0`` or less. Since we will " -"be adding ``delta`` to ``explosion_wait_timer`` right after, whatever code " -"under the check will only be called once, right when we've waited long " -"enough and need to explode." +"check if the grenade has waited long enough and needs to explode. We do this " +"by checking to see if ``explosion_wait_timer`` is equal to ``0`` or less. " +"Since we will be adding ``delta`` to ``explosion_wait_timer`` right after, " +"whatever code under the check will only be called once, right when the " +"grenade has waited long enough and needs to explode." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:133 msgid "" -"If we've waited long enough to explode, we first tell the " +"If the grenade has waited long enough to explode, we first tell the " "``explosion_particles`` to emit. Then we make ``grenade_mesh`` invisible, " -"and disable ``rigid_shape``, effectively hiding our grenade." +"and disable ``rigid_shape``, effectively hiding the grenade." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:136 @@ -27810,7 +27864,9 @@ msgstr "" msgid "" "Then we get all of the bodies in ``blast_area``, check to see if they have " "the ``bullet_hit`` method/function, and if they do we call it and pass in " -"``GRENADE_DAMAGE`` and the grenade's position." +"``GRENADE_DAMAGE`` and the transform from the body looking at the grenade. " +"This makes it where the bodies exploded by the grenade will explode outwards " +"from the grenade's position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:141 @@ -27825,209 +27881,216 @@ msgid "" "Next we check to see if ``explosion_wait_timer`` is more than or equal to " "``EXPLOSTION_WAIT_TIME``. Because we added ``delta``, this will only be " "called once. If ``explosion_wait_timer`` is more or equal to " -"``EXPLOSION_WAIT_TIME``, we've waited long enough to let the :ref:`Particles " -"` play and can free/destroy ourselves." +"``EXPLOSION_WAIT_TIME``, the grenade has waited long enough to let the :ref:" +"`Particles ` play and we can free/destroy the grenade as we " +"no longer need it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:148 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:149 msgid "" "Let's quickly get the sticky grenade set up too. Open up ``Sticky_Grenade." "tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:150 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:151 msgid "" "``Sticky_Grenade.tscn`` is almost identical to ``Grenade.tscn``, with one " "small addition. We now have a second :ref:`Area `, called " -"``Sticky_Area``. We'll be using ``Stick_Area`` to detect when we've collided " -"with the environment and need to stick to something." +"``Sticky_Area``. We will be using ``Stick_Area`` to detect when the sticky " +"grenade has collided with the environment and needs to stick to something." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:154 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:155 msgid "" "Select ``Sticky_Grenade`` and make a new script called ``Sticky_Grenade." "gd``. Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:244 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:245 msgid "" "The code above is almost identical to the code for ``Grenade.gd``, so let's " -"go over what's changed." +"just go over what's changed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:246 -msgid "First, we have a few more global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:248 -msgid "" -"``attached``: A variable for tracking whether or not we've attached to a :" -"ref:`PhysicsBody `." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:247 +msgid "First, we have a few more class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:249 msgid "" -"``attach_point``: A variable to hold a :ref:`Spatial ` that " -"will be at the position we collided at." +"``attached``: A variable for tracking whether or not the sticky grenade has " +"attached to a :ref:`PhysicsBody `." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:250 msgid "" +"``attach_point``: A variable to hold a :ref:`Spatial ` that " +"will be at the position the sticky grenade collided at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:251 +msgid "" "``player_body``: The player's :ref:`KinematicBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:252 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:253 msgid "" -"These additions are so we can stick to any :ref:`PhysicsBody " -"` we happen to hit. We also now need the player's :ref:" -"`KinematicBody ` so we don't stick to the player that " -"threw this grenade." +"These additions are so the sticky grenade can stick to any :ref:`PhysicsBody " +"` it happens to hit. We also now need the player's :ref:" +"`KinematicBody ` so the sticky grenade does not stick " +"to the player when the player throws it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:257 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:258 msgid "" "Now let's look at the small change in ``_ready``. In ``_ready`` we've added " "a line of code so when any body enters ``Stick_Area``, the " "``collided_with_body`` function is called." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:262 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:263 msgid "Next let's take a look at ``collided_with_body``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:264 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:265 msgid "" -"First we make sure we're not colliding with ourself. Because our :ref:`Area " -"` does not know it's attached to the grenade's :ref:`RigidBody " -"`, we need to make sure we're not going to stick to " -"ourself. If we have collided with ourself, we ignore it by returning." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:267 -msgid "" -"We then check to see if we have something assigned to ``player_body``, and " -"if the body we collided with is the player that threw this grenade. If the " -"body we've collided with is indeed ``player_body``, we ignore it by " +"First we make sure the sticky grenade is not colliding with itself. Because " +"the sticky :ref:`Area ` does not know it's attached to the " +"grenade's :ref:`RigidBody `, we need to make sure it's not " +"going to stick to itself by checking to make sure the body it has collided " +"with is not itself. If we have collided with ourself, we ignore it by " "returning." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:270 -msgid "Next we check if we are attached already or not." +msgid "" +"We then check to see if we have something assigned to ``player_body``, and " +"if the body the sticky grenade has collided with is the player that threw " +"it. If the body the sticky grenade has collided with is indeed " +"``player_body``, we ignore it by returning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:272 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:273 msgid "" -"If we are not attached, we then set ``attached`` to true so we know we've " -"attached to something." +"Next we check if the sticky grenade has attached to something already or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:274 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:275 msgid "" -"We then make a new :ref:`Spatial ` node, and make it a child " -"of the body we collided with. We then set the :ref:`Spatial " -"`'s position to our current position." +"If the sticky grenade is not attached, we then set ``attached`` to true so " +"we know the sticky grenade has attached to something." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:277 msgid "" -"Because we've added the :ref:`Spatial ` as a child of the " -"body we've collided with, it will follow along with said body. We can then " -"use this :ref:`Spatial ` to set our position, so we're always " -"at the same position relative to the body we collided with." +"We then make a new :ref:`Spatial ` node, and make it a child " +"of the body the sticky grenade collided with. We then set the :ref:`Spatial " +"`'s position to the sticky grenade's current global position." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:280 msgid "" -"We then disable ``rigid_shape`` so we're not constantly moving whatever body " -"we've collided with. Finally, we set our mode to ``MODE_STATIC`` so the " -"grenade does not move." +"Because we've added the :ref:`Spatial ` as a child of the " +"body the sticky grenade has collided with, it will follow along with said " +"body. We can then use this :ref:`Spatial ` to set the sticky " +"grenade's position, so it is always at the same position relative to the " +"body it collided with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:284 -msgid "Finally, lets go over the few changes in ``_process``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:286 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:283 msgid "" -"Now we're checking to see if we are attached right at the top of " -"``_process``." +"We then disable ``rigid_shape`` so the sticky grenade is not constantly " +"moving whatever body it has collided with. Finally, we set our mode to " +"``MODE_STATIC`` so the grenade does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:288 +msgid "Finally, lets go over the few changes in ``_process``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:290 msgid "" -"If we are attached, we then make sure the attached point is not equal to " -"``null``. If the attached point is not equal to ``null``, we set our global " -"position (using our global :ref:`Transform `'s origin) to " -"the global position of the :ref:`Spatial ` assigned to " -"``attach_point`` (using its global :ref:`Transform `'s " -"origin)." +"Now we're checking to see if the sticky grenade is attached right at the top " +"of ``_process``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:292 msgid "" -"The only other change is now before we free/destroy the grenade, we check to " -"see if we have an attached point. If we do, we also call ``queue_free`` on " -"it, so it's also freed/destroyed." +"If the sticky grenade is attached, we then make sure the attached point is " +"not equal to ``null``. If the attached point is not equal to ``null``, we " +"set the sticky grenade's global position (using its global :ref:`Transform " +"`'s origin) to the global position of the :ref:`Spatial " +"` assigned to ``attach_point`` (using its global :ref:" +"`Transform `'s origin)." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:296 -msgid "Adding grenades to the player" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:298 msgid "" -"Now we need to add some code to ``Player.gd`` so we can use our grenades." +"The only other change is now before we free/destroy the sticky grenade is to " +"check to see if the sticky grenade has a attached point. If it does, we also " +"call ``queue_free`` on the attach point, so it's also freed/destroyed." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:300 +msgid "Adding grenades to the player" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:302 +msgid "" +"Now we need to add some code to ``Player.gd`` so we can use the grenades." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:304 msgid "" "First, open up ``Player.tscn`` and expand the node tree until you get to " "``Rotation_Helper``. Notice how in ``Rotation_Helper`` we have a node called " "``Grenade_Toss_Pos``. This is where we will be spawning the grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:303 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:307 msgid "" "Also notice how it's slightly rotated on the ``X`` axis, so it's not " "pointing straight, but rather slightly up. By changing the rotation of " "``Grenade_Toss_Pos``, you can change the angle the grenades are tossed at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:306 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:310 msgid "" -"Okay, now lets start making the grenades work with our player. Add the " -"following global variables to ``Player.gd``:" +"Okay, now let's start making the grenades work with the player. Add the " +"following class variables to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 msgid "" -"``grenade_amounts``: The amount of grenades we are currently carrying for " -"each type of grenade." +"``grenade_amounts``: The amount of grenades the player is currently carrying " +"(for each type of grenade)." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:317 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:321 msgid "" -"``current_grenade``: The name of the grenade type we're currently using." +"``current_grenade``: The name of the grenade the player is currently using." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:318 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 msgid "``grenade_scene``: The grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:319 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:323 msgid "" "``sticky_grenade_scene``: The sticky grenade scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:320 -msgid "``GRENADE_THROW_FORCE``: The force at which we throw the grenade at." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +msgid "" +"``GRENADE_THROW_FORCE``: The force at which the player will throw the " +"grenades at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:322 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:326 msgid "Most of these variables are similar to how we have out weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:324 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:328 msgid "" "While it's possible to make a more modular grenade system, I found it was " "not worth the additional complexity for just two grenades. If you were going " @@ -28035,79 +28098,79 @@ msgid "" "system for grenades similar to how we have the weapons set up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:329 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:333 msgid "" "Now we need to add some code in ``_process_input`` Add the following to " "``_process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:361 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:365 msgid "" "First, we check to see if the ``change_grenade`` action has just been " -"pressed. If it has, we then check to see which grenade we are currently " -"using. Based on the name of the grenade we're currently using, we change " -"``current_grenade`` to the opposite grenade name." +"pressed. If it has, we then check to see which grenade the player is " +"currently using. Based on the name of the grenade the player is currently " +"using, we change ``current_grenade`` to the opposite grenade name." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:368 msgid "" "Next we check to see if the ``fire_grenade`` action has just been pressed. " -"If it has, we then check to see if we have more than ``0`` grenades for the " -"current grenade we have selected." +"If it has, we then check to see if the player has more than ``0`` grenades " +"for the current grenade type selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:367 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:371 msgid "" -"If we have more than ``0`` grenades, we then remove one from the grenade " -"amounts for the current grenade. Then, based on the grenade we're currently " -"using we instance the proper grenade scene and assign it to " -"``grenade_clone``." +"If the player has more than ``0`` grenades, we then remove one from the " +"grenade amounts for the current grenade. Then, based on the grenade the " +"player is currently using, we instance the proper grenade scene and assign " +"it to ``grenade_clone``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:370 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:374 msgid "" -"Next we add ``grenade_clone`` as a child of the node at the root, and set " -"its global :ref:`Transform ` to ``Grenade_Toss_Pos``'s " -"global :ref:`Transform `. Finally, we apply an impulse to " -"the grenade so that it is launched forward, relative to the ``Z`` " -"directional vector of ``grenade_clone``'s." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:376 -msgid "" -"Now we can use both types of grenades, but there's a few things we should " -"probably add before we move on to adding the other things." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:378 -msgid "" -"We still need a way to see how many grenades we have left, and we should " -"probably have a way to get more grenades when we pick up ammo." +"Next we add ``grenade_clone`` as a child of the node at the root and set its " +"global :ref:`Transform ` to ``Grenade_Toss_Pos``'s global :" +"ref:`Transform `. Finally, we apply an impulse to the " +"grenade so that it is launched forward, relative to the ``Z`` directional " +"vector of ``grenade_clone``'s." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:380 msgid "" -"First, let's change some of the code in ``Player.gd`` so we can see how many " -"grenades we have left. Change ``process_UI`` to the following:" +"Now the player can use both types of grenades, but there is still a few " +"things we should probably add before we move on to adding the other things." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:396 -msgid "Now we'll show how many grenades we have left in our UI." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:382 msgid "" -"While we're still in ``Player.gd``, let's add a function to add grenades. " -"Add the following function to ``Player.gd``:" +"We still need a way to show the player how many grenades are left, and we " +"should probably add a way to get more grenades when the player picks up ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:406 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:384 +msgid "" +"First, let's change some of the code in ``Player.gd`` to show how many " +"grenades are left. Change ``process_UI`` to the following:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:400 +msgid "Now we'll show how many grenades the player has left in the UI." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:402 +msgid "" +"While we're still in ``Player.gd``, let's add a function to add grenades to " +"the player. Add the following function to ``Player.gd``:" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:410 msgid "" "Now we can add a grenade using ``add_grenade``, and it will automatically be " "clamped to a maximum of ``4`` grenades." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:408 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:412 msgid "" "You can change the ``4`` to a constant if you want. You'd need to make a new " "global constant, something like ``MAX_GRENADES``, and then change the clamp " @@ -28115,127 +28178,127 @@ msgid "" "``clamp(grenade_amounts[current_grenade], 0, MAX_GRENADES)``" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:411 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 msgid "" -"If you do not want to limit how many grenades you can carry, remove the line " -"that clamps the grenades altogether!" +"If you do not want to limit how many grenades the player can carry, remove " +"the line that clamps the grenades altogether!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:413 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:417 msgid "" "Now we have a function to add grenades, let's open up ``AmmoPickup.gd`` and " "use it!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:415 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:419 msgid "" "Open up ``AmmoPickup.gd`` and go to the ``trigger_body_entered`` function. " "Change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:434 msgid "" -"Now we're also checking to see if the body has the ``add_grenade`` function. " -"If it does, we call it like we call ``add_ammo``." +"Now we are also checking to see if the body has the ``add_grenade`` " +"function. If it does, we call it like we call ``add_ammo``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:432 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:436 msgid "" -"You may have noticed we're using a new constant we haven't defined yet, " -"``GRENADE_AMOUNTS``. Let's add it! Add the following global variable to " -"``AmmoPickup.gd`` with the other global variables:" +"You may have noticed we are using a new constant we have not defined yet, " +"``GRENADE_AMOUNTS``. Let's add it! Add the following class variable to " +"``AmmoPickup.gd`` with the other class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:439 -msgid "" -"``GRENADE_AMOUNTS``: The amount of grenades each pick up in each size " -"contains." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:443 +msgid "``GRENADE_AMOUNTS``: The amount of grenades each pick up contains." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:441 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:445 msgid "" "Notice how the second element in ``GRENADE_AMOUNTS`` is ``0``. This is so " -"the small ammo pick up does not give our player any additional grenades." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:446 -msgid "Now you should be able to throw grenades now! Go give it a try!" +"the small ammo pick up does not give the player any additional grenades." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:450 +msgid "Now you should be able to throw grenades now! Go give it a try!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:454 msgid "Adding the ability to grab and throw RigidBody nodes to the player" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:452 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:456 msgid "" -"Next let's give our player the ability to pick up and throw :ref:`RigidBody " +"Next let's give the player the ability to pick up and throw :ref:`RigidBody " "` nodes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:463 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:467 msgid "" "``grabbed_object``: A variable to hold the grabbed :ref:`RigidBody " "` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:464 -msgid "``OBJECT_THROW_FORCE``: The force we throw the grabbed object at." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:465 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 msgid "" -"``OBJECT_GRAB_DISTANCE``: The distance away from the camera we hold the " -"grabbed object at." +"``OBJECT_THROW_FORCE``: The force the player throws the grabbed object at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:466 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:469 +msgid "" +"``OBJECT_GRAB_DISTANCE``: The distance away from the camera the player holds " +"the grabbed object at." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:470 msgid "" "``OBJECT_GRAB_RAY_DISTANCE``: The distance the :ref:`Raycast " -"` goes. This is our grab distance." +"` goes. This is the player's grab distance." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:468 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:472 msgid "" "With that done, all we need to do is add some code to ``process_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:506 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:350 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:510 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:353 msgid "Let's go over what's happening." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:508 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 msgid "" "First we check to see if the action pressed is the ``fire`` action, and that " -"we are using the ``UNARMED`` weapon. This is because we only want to be able " -"to pick up and throw objects when we're not using any weapons. This is a " -"design choice, but I feel it gives ``UNARMED`` a use." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:512 -msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +"the player is using the ``UNARMED`` 'weapon'. This is because we only want " +"the player to be able to pick up and throw objects when the player is not " +"using any weapons. This is a design choice, but I feel it gives ``UNARMED`` " +"a use." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:516 +msgid "Next we check to see whether or not ``grabbed_object`` is ``null``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:520 msgid "" "If ``grabbed_object`` is ``null``, we want to see if we can pick up a :ref:" "`RigidBody `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:522 msgid "" "We first get the direct space state from the current :ref:`World " "`. This is so we can cast a ray entirely from code, instead of " "having to use a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:521 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:525 msgid "" "see :ref:`Ray-casting ` for more information on raycasting " "in Godot." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:523 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:527 msgid "" "Then we get the center of the screen by dividing the current :ref:`Viewport " "` size in half. We then get the ray's origin point and end " @@ -28244,74 +28307,77 @@ msgid "" "`Ray-casting `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:526 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:530 msgid "" -"Next we send our ray into the space state and see if we get a result. We add " -"ourselves and the knife's :ref:`Area ` as two exceptions so we " -"cannot carry ourselves or the knife's collision area." +"Next we send the ray into the space state and see if it gets a result. We " +"add the player and the knife's :ref:`Area ` as two exceptions so " +"the player cannot carry themselves or the knife's collision :ref:`Area " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:529 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:533 msgid "" -"Then we check to see if we got a result back. If we have, we then see if the " -"collider the ray collided with is a :ref:`RigidBody `." +"Then we check to see if we got a result back from the ray. If we have, we " +"then see if the collider the ray collided with is a :ref:`RigidBody " +"`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:531 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:535 msgid "" "If the ray collided with a :ref:`RigidBody `, we set " "``grabbed_object`` to the collider the ray collided with. We then set the " "mode on the :ref:`RigidBody ` we collided with to " -"``MODE_STATIC`` so it's not moved." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:534 -msgid "" -"Finally, we set its collision layer and collision mask to ``0``. This will " -"make it have no collision layer or mask, which will means it will not be " -"able to collide with anything." +"``MODE_STATIC`` so it does not move." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:538 msgid "" -"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" -"`RigidBody ` we're holding." +"Finally, we set the grabbed :ref:`RigidBody `'s collision " +"layer and collision mask to ``0``. This will make the grabbed :ref:" +"`RigidBody ` have no collision layer or mask, which will " +"means it will not be able to collide with anything." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:540 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:543 +msgid "" +"If ``grabbed_object`` is not ``null``, then we need to throw the :ref:" +"`RigidBody ` the player is holding." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 msgid "" "We first set the :ref:`RigidBody ` we holding mode to " "``MODE_RIGID``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:542 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:547 msgid "" "This is making a rather large assumption that the all rigid bodies will be " "using ``MODE_RIGID``. While that is the case for this tutorial series, that " "may not be the case in other projects." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:545 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 msgid "" "If you have :ref:`RigidBody `'s with different modes, you " "may need to store the mode of the :ref:`RigidBody ` you " -"have picked up into a global variable so you can change it back to the mode " +"have picked up into a class variable so you can change it back to the mode " "it was in before you picked it up." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:548 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:553 msgid "" "Then we apply an impulse to send it flying forward. We send it flying in the " "direction the camera is facing, at ``OBJECT_THROW_FORCE`` force." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:550 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 msgid "" "We then set the grabbed :ref:`RigidBody `'s collision layer " "and mask to ``1``, so it can collide with anything on layer ``1`` again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:552 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:557 msgid "" "This is, once again, making a rather large assumption that all rigid bodies " "will be only on collision layer ``1``, and all collision masks will be on " @@ -28320,290 +28386,291 @@ msgid "" "before you change them to ``0``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:555 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:560 msgid "" -"Finally, we set ``grabbed_object`` to ``null`` since we have successfully " -"thrown the held object." +"Finally, we set ``grabbed_object`` to ``null`` since the player has " +"successfully thrown the held object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:559 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 msgid "" "The last thing we do is check to see whether or not ``grabbed_object`` is " -"equal to ``null``, outside of the grabbing/throwing code." +"equal to ``null``, outside all of the grabbing/throwing related code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:561 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:566 msgid "" "While technically not input related, it's easy enough to place the code " "moving the grabbed object here because it's only two lines, and then all of " "the grabbing/throwing code is in one place" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:564 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:569 msgid "" -"If we are holding an object, we set its global position to the camera's " -"position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera is facing." +"If the player is holding a object, we set its global position to the " +"camera's position plus ``OBJECT_GRAB_DISTANCE`` in the direction the camera " +"is facing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:568 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:573 msgid "" "Before we test this, we need to change something in ``_physics_process``. " -"While we're holding an object, we don't want to be able to change weapons or " -"reload, so change ``_physics_process`` to the following:" +"While the player is holding an object, we do not want the player to be able " +"to change weapons or reload, so change ``_physics_process`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:585 -msgid "Now we cannot change weapons or reload while holding an object." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +msgid "Now the player cannot change weapons or reload while holding an object." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:587 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 msgid "" "Now you can grab and throw RigidBody nodes while in a ``UNARMED`` state! Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:590 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:595 msgid "Adding a turret" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:592 -msgid "Next, let's make a turret to shoot our player!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:597 +msgid "Next, let's make a turret to shoot the player!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:594 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:599 msgid "" "Open up ``Turret.tscn``. Expand ``Turret`` if it's not already expanded." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:596 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 msgid "" -"Notice how our turret is broken up into several parts. We have a ``Base``, " +"Notice how the turret is broken up into several parts. We have a ``Base``, " "``Head``, ``Vision_Area``, and a ``Smoke`` :ref:`Particles " "`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:598 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:603 msgid "" "Open up ``Base`` and you'll find it's a :ref:`StaticBody ` " "and a mesh. Open up ``Head`` and you'll find there's several meshes, a :ref:" "`StaticBody ` and a :ref:`Raycast ` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:601 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 msgid "" -"One thing to note with the ``Head`` is that the raycast will be where our " -"bullets will fire from if we are using raycasting. We also have two meshes " -"called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " +"One thing to note with the ``Head`` is that the raycast will be where the " +"turret's bullets will fire from if we are using raycasting. We also have two " +"meshes called ``Flash`` and ``Flash_2``. These will be the muzzle flash that " "briefly shows when the turret fires." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:604 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:609 msgid "" "``Vision_Area`` is a :ref:`Area ` we'll use as the turret's " "ability to see. When something enters ``Vision_Area``, we'll assume the " "turret can see it." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:606 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:611 msgid "" "``Smoke`` is a :ref:`Particles ` node that will play when " "the turret is destroyed and repairing." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:610 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:615 msgid "" -"Now that we've looked at how the scene is set up, lets start writting the " +"Now that we've looked at how the scene is set up, lets start writing the " "code for the turret. Select ``Turret`` and create a new script called " "``Turret.gd``. Add the following to ``Turret.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:776 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 msgid "" "This is quite a bit of code, so let's break it down function by function. " -"Let's first look at the global variables:" +"Let's first look at the class variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:778 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 msgid "" "``use_raycast``: A exported boolean so we can change whether the turret uses " "objects or raycasting for bullets." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:779 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 msgid "" "``TURRET_DAMAGE_BULLET``: The amount of damage a single bullet scene does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:780 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 msgid "" "``TURRET_DAMAGE_RAYCAST``: The amount of damage a single :ref:`Raycast " "` bullet does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:781 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 msgid "" "``FLASH_TIME``: The amount of time (in seconds) the muzzle flash meshes are " "visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 msgid "" "``flash_timer``: A variable for tracking how long the muzzle flash meshes " "have been visible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:783 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 msgid "``FIRE_TIME``: The amount of time (in seconds) needed to fire a bullet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:784 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 msgid "" "``fire_timer``: A variable for tracking how much time has passed since the " "turret last fired." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:785 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 msgid "``node_turret_head``: A variable to hold the ``Head`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 msgid "" "``node_raycast``: A variable to hold the :ref:`Raycast ` node " "attached to the turret's head." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:787 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 msgid "" "``node_flash_one``: A variable to hold the first muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 msgid "" "``node_flash_two``: A variable to hold the second muzzle flash :ref:" "`MeshInstance `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:789 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 msgid "``ammo_in_turret``: The amount of ammo currently in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 msgid "``AMMO_IN_FULL_TURRET``: The amount of ammo in a full turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:791 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 msgid "``AMMO_RELOAD_TIME``: The amount of time it takes the turret to reload." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:792 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 msgid "" "``ammo_reload_timer``: A variable for tracking how long the turret has been " "reloading." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:793 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 msgid "``current_target``: The turret's current target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:794 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 msgid "" "``is_active``: A variable for tracking whether the turret is able to fire at " "the target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:795 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 msgid "" "``PLAYER_HEIGHT``: The amount of height we're adding to the target so we're " "not shooting at its feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:796 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 msgid "``smoke_particles``: A variable to hold the smoke particles node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:797 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:802 msgid "``turret_health``: The amount of health the turret currently has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:798 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 msgid "``MAX_TURRET_HEALTH``: The amount of health a fully healed turret has." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:799 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:804 msgid "" "``DESTROYED_TIME``: The amount of time (in seconds) it takes for a destroyed " "turret to repair itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:800 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:805 msgid "" "``destroyed_timer``: A variable for tracking the amount of time a turret has " "been destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:801 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:806 msgid "" "``bullet_scene``: The bullet scene the turret fires (same scene as the " "player's pistol)" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:803 -msgid "Phew, that's quite a few global variables!" +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:808 +msgid "Phew, that's quite a few class variables!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:807 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:812 msgid "Let's go through ``_ready`` next." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:809 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:814 msgid "" "First we get the vision area and connect the ``body_entered`` and " "``body_exited`` signals to ``body_entered_vision`` and " "``body_exited_vision`` respectively." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:811 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:816 msgid "" "We then get all of the nodes and assign them to their respective variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:813 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:818 msgid "" "Next add some exceptions to the :ref:`Raycast ` so the turret " "cannot hurt itself." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:815 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 msgid "" -"Then we make both flash meshes invisible to start, since we're not going to " +"Then we make both flash meshes invisible to start, since we are not going to " "be firing during ``_ready``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:817 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:822 msgid "" "We then get the smoke particles node and assign it to the " "``smoke_particles`` node. We also set ``emitting`` to ``false`` to assure " -"it's not emitting until the turret is broken." +"the particles are not emitting until the turret is broken." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:820 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:825 msgid "" "Finally, we set the turret's health to ``MAX_TURRET_HEALTH`` so it starts at " "full health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:824 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:829 msgid "Now let's go through ``_physics_process``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:826 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:831 msgid "" "First we check to see if the turret is active. If the turret is active we " "want to process the firing code." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:828 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:833 msgid "" "Next we check to see if ``flash_timer`` is more than zero, meaning the flash " "meshes are visible, we want to remove delta from ``flash_timer``. If " @@ -28611,184 +28678,190 @@ msgid "" "want to hide both of the flash meshes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:832 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 msgid "" -"Next we check to see if we have a target or not. If we have a target, we " -"make the turret head look at it, adding ``PLAYER_HEIGHT`` so we're not " -"aiming at the player's feet." +"Next we check to see if the turret has a target or not. If the turret has a " +"target, we make the turret head look at it, adding ``PLAYER_HEIGHT`` so it " +"is not aiming at the player's feet." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:835 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 msgid "" "We then check to see if the turret's health is more than zero. If it is, we " "then check to see if there is ammo in the turret." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:842 msgid "" "If there is ammo in the turret, we then check to see if ``fire_timer`` is " -"more than zero. If ``fire_timer`` is more than zero, we cannot fire and need " -"to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is equal to or " -"less than zero, we want to fire a bullet, so we call the ``fire_bullet`` " -"function." +"more than zero. If ``fire_timer`` is more than zero, the turret cannot fire " +"and we need to remove ``delta`` from ``fire_timer``. If ``fire_timer`` is " +"equal to or less than zero, the turret can fire a bullet, so we call the " +"``fire_bullet`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:840 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:845 msgid "" "If there is not any ammo in the turret, we check to see if " "``ammo_reload_timer`` is more than zero. If ``ammo_reload_timer`` is more " "than zero, we subtract ``delta`` from ``ammo_reload_timer``. If " "``ammo_reload_timer`` is equal to or less than zero, we set " -"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because we've waited long " -"enough to refill the turret." +"``ammo_in_turret`` to ``AMMO_IN_FULL_TURRET`` because the turret has waited " +"long enough to refill its ammo." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:849 msgid "" "Next we check to see if the turret's health is less than or equal to ``0``, " -"outside of whether we're active or not. If the turret's health is zero or " +"outside of whether it is active or not. If the turret's health is zero or " "less, we then check to see if ``destroyed_timer`` is more than zero. If " "destroyed timer is more than zero, we subtract ``delta`` from " "``destroyed_timer``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:847 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 msgid "" "If ``destyored_timer`` is less than or equal to zero, we set " "``turret_health`` to ``MAX_TURRET_HEALTH`` and stop emitting smoke particles " "by setting ``smoke_particles.emitting`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:852 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:857 msgid "Next let's go through ``fire_bullet``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:854 -msgid "First we check to see whether we're using a raycast or not." +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 +msgid "First we check to see whether the turret is using a raycast or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:856 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:861 msgid "" "The code for the using a raycast is almost entirely the same as the code in " "the rifle from :ref:`doc_fps_tutorial_part_two`, so I'm only going to go " "over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:859 -msgid "" -"We first make the raycast look at the target, assuring we'll hit the target. " -"We then force the raycast to update so we get a frame perfect collision " -"check. We then check if the raycast collided with anything. If the raycast " -"has collided with something, we then check to see if the collided body has " -"the ``bullet_hit`` function. If it does, we call it and pass in the damage a " -"single raycast bullet does. We then remove ``1`` from ``ammo_in_turret``." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:864 msgid "" -"If we are not using a raycast, we spawn a bullet object instead. This code " -"is almost entirely the same as the code in the pistol from :ref:" +"We first make the raycast look at the target, assuring the raycast will hit " +"the target if nothing is in the way. We then force the raycast to update so " +"we get a frame perfect collision check. We then check if the raycast " +"collided with anything. If the raycast has collided with something, we then " +"check to see if the collided body has the ``bullet_hit`` function. If it " +"does, we call it and pass in the damage a single raycast bullet does along " +"with the raycast's transform. We then remove ``1`` from ``ammo_in_turret``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:869 +msgid "" +"If the turret is not using a raycast, we spawn a bullet object instead. This " +"code is almost entirely the same as the code in the pistol from :ref:" "`doc_fps_tutorial_part_two`, so like with the raycast code, I'm only going " "to go over it briefly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:867 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:872 msgid "" "We first make a bullet clone and assign it to ``clone``. We then add that as " -"a child of the root node. We set it's global transform to the barrel end, " -"scale it up since it's too small, and set it's damage and speed using the " -"turret's constant global variables. We then remove ``1`` from " +"a child of the root node. We set the bullet's global transform to the barrel " +"end, scale it up since it's too small, and set it's damage and speed using " +"the turret's constant class variables. We then remove ``1`` from " "``ammo_in_turret``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:871 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:876 msgid "" "Then, regardless of which bullet method we used, we make both of the muzzle " "flash meshes visible. We set ``flash_timer`` and ``fire_timer`` to to " -"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if we " -"used the last bullet in the turret. If we have used the last bullet, we set " -"``ammo_reload_timer`` to ``AMMO_RELOAD_TIME``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:877 -msgid "" -"Let's look at ``body_entered_vision`` next, and thankfully it's rather short." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:879 -msgid "" -"We first check to see if we currently have a target by checking to see if " -"``current_target`` is equal to ``null``. If we do not have a target, we then " -"check to see if the body that just entered the vision :ref:`Area " -"` is a :ref:`KinematicBody `" +"``FLASH_TIME`` and ``FIRE_TIME`` respectively. We then check to see if the " +"turret used the last bullet in its ammo. If the turret has used the last " +"bullet, we set ``ammo_reload_timer`` to ``AMMO_RELOAD_TIME`` so the turret " +"reloads." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:882 msgid "" -"..note:: We're assuming the turret only should fire at :ref:`KinematicBody " -"` nodes, since that's what our player(s) are using." +"Let's look at ``body_entered_vision`` next, and thankfully it is rather " +"short." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:884 msgid "" +"We first check to see if the turret currently has a target by checking to " +"see if ``current_target`` is equal to ``null``. If the turret does not have " +"a target, we then check to see if the body that just entered the vision :ref:" +"`Area ` is a :ref:`KinematicBody `" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:887 +msgid "" +"..note:: We're assuming the turret should only should fire at :ref:" +"`KinematicBody ` nodes, since that is what the player " +"is using." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +msgid "" "If the body that just the vision :ref:`Area ` is a :ref:" "`KinematicBody `, we set ``current_target`` to the " "body, and set ``is_active`` to ``true``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 msgid "Now let's look at ``body_exited_vision``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:891 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:896 msgid "" -"First we check to see if we have a target. If we have a target, we then " -"check to see if the body that has just left our vision area is our target." +"First we check to see if the turret has a target. If the turret has a " +"target, we then check to see if the body that has just left the turret's " +"vision area is the turret's target." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:894 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:899 msgid "" -"If the body that just left the area is the current target, we set " +"If the body that just left the area is the turret's current target, we set " "``current_target`` to ``null``, set ``is_active`` to ``false``, and reset " -"all of the variables related to firing the turret, since we no longer have a " -"target to fire at." +"all of the variables related to firing the turret, since the turret no " +"longer has a target to fire at." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:901 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:906 msgid "" -"We first remove however much damage we have received from the turret's " +"We first remove however much damage the bullet causes from the turret's " "health." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:903 -msgid "" -"Then we check to see if we've been destroyed. If we have, we start the smoke " -"particles emitting and set ``destroyed_timer`` to ``DESTROYED_TIME`` so we " -"have to wait to repair the turret." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:908 msgid "" +"Then we check to see if the turret has been destroyed (health being zero or " +"less). If the turret is destroyed, we start the smoke particles emitting and " +"set ``destroyed_timer`` to ``DESTROYED_TIME`` so the turret has to wait " +"before being repaired." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:913 +msgid "" "Phew, with all of that done and coded we only have one last thing to do " -"before our turrets are ready for use. Open up ``Turret.tscn`` if it's not " +"before the turret is ready for use. Open up ``Turret.tscn`` if it's not " "already open and select one of the :ref:`StaticBody ` " -"nodes from either ``Body`` or ``Head``. Create a new script called " +"nodes from either ``Base`` or ``Head``. Create a new script called " "``TurretBodies.gd`` and attach it to whichever :ref:`StaticBody " "` you have selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:912 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:917 msgid "Add the following code to ``TurretBodies.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:932 msgid "" "All this code does is call ``bullet_hit`` on whatever node " "``path_to_turret_root`` leads to. Go back to the editor and assign the :ref:" "`NodePath ` to the ``Turret`` node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:930 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 msgid "" "Now select the other :ref:`StaticBody ` node (either in " "``Body`` or ``Head``) and assign ``TurretBodies.gd`` to it. Once the script " @@ -28796,37 +28869,37 @@ msgid "" "node." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:940 msgid "" "The last thing we need to do is add a way for the player to be hurt. Since " -"all of our bullets use the ``bullet_hit`` function, we need to add that to " -"our player." +"all of the bullets use the ``bullet_hit`` function, we need to add that " +"function to the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:937 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:942 msgid "Open ``Player.gd`` and add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:944 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:949 msgid "" "With all that done, you should have fully operational turrets! Go place a " "few in one/both/all of the scenes and give them a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:951 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:956 msgid "" "Now you the player can pick up :ref:`RigidBody ` nodes and " -"throw grenades. We now also have turrets to fire at our player." +"throw grenades. We now also have turrets to fire at the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:953 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 msgid "" "In :ref:`doc_fps_tutorial_part_six`, we're going to add a main menu and " "pause menu, add a respawn system for the player, and change/move the sound " "system so we can use it from any script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:958 +#: ../../docs/tutorials/3d/fps_tutorial/part_five.rst:963 msgid "" "You can download the finished project for this part here: :download:" "`Godot_FPS_Part_5.zip `" @@ -28910,7 +28983,7 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:128 -msgid "Let's look at the global variables first." +msgid "Let's look at the class variables first." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:130 @@ -28973,8 +29046,8 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:147 msgid "" -"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever we " -"return to this scene our mouse will be visible." +"We then set the mouse mode to ``MOUSE_MODE_VISIBLE`` to ensure whenever the " +"player returns to this scene the mouse will be visible." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:149 @@ -28997,7 +29070,7 @@ msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:158 msgid "" "Based on the button pressed, we either change the currently visible panel, " -"quit the application, or open the Godot engine website." +"quit the application, or open the Godot website." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:162 @@ -29007,118 +29080,118 @@ msgid "" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:164 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:175 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:176 msgid "" "If the ``back`` button has been pressed, we change the currently visible " -"panels so we return to the main menu." +"panels to return to the main menu." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:166 msgid "" "If one of the scene changing buttons are pressed, we fist call " -"``set_mouse_and_joypad_sensitivity`` so our singleton has the values from " -"the :ref:`HSlider ` nodes. Then we tell the singleton to " -"change nodes using it's ``load_new_scene`` function, passing in the file " -"path of the scene we're wanting to change to." +"``set_mouse_and_joypad_sensitivity`` so the singleton (``Globals.gd``) has " +"the values from the :ref:`HSlider ` nodes. Then we tell the " +"singleton to change nodes using it's ``load_new_scene`` function, passing in " +"the file path of the scene the player has selected." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:169 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:170 msgid "Don't worry about the singleton, we'll get there soon!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:173 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:174 msgid "" "In ``options_menu_button_pressed``, we check to see which button is pressed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:177 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:178 msgid "" "If the ``fullscreen`` button is pressed we toggle the :ref:`OS `'s " "full screen mode by setting it to the flipped version of it's current value." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:179 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:180 msgid "" "If the ``vsync`` button is pressed we set the :ref:`OS `'s Vsync " "based on the state of the Vsync check button." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:183 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:184 msgid "Finally, lets take a look at ``set_mouse_and_joypad_sensitivity``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:185 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:186 msgid "" "First we get the ``Globals`` singleton and assign it to a local variable." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:187 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:188 msgid "" "We then set the ``mouse_sensitivity`` and ``joypad_sensitvity`` variables to " "the values in their respective :ref:`HSlider ` node " "counterparts." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:190 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:191 msgid "Making the ``Globals`` singleton" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:192 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:193 msgid "" "Now, for this all to work we need to create the ``Globals`` singleton. Make " "a new script in the ``Script`` tab and call it ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:194 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:195 msgid "Add the following to ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:209 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:210 msgid "" "As you can see, it's quite small and simple. As this part progresses we will " "keeping adding complexities to ``Global.gd``, but for now all it is doing is " -"holding two variables for us, and abstracting how we change scenes." +"holding two class variables, and abstracting how we change scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:212 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 msgid "" "``mouse_sensitivity``: The current sensitivity for our mouse, so we can load " "it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:213 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:214 msgid "" "``joypad_sensitivity``: The current sensitivity for our joypad, so we can " "load it in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:215 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:216 msgid "" -"Right now all we're using ``Globals.gd`` for is a way to carry variables " -"across scenes. Because the sensitivity for our mouse and joypad are stored " -"in ``Globals.gd``, any changes we make in one scene (like ``Main_Menu``) " -"effect the sensitivity for our player." +"Right now all we will be using ``Globals.gd`` for is a way to carry " +"variables across scenes. Because the sensitivity for our mouse and joypad " +"are stored in ``Globals.gd``, any changes we make in one scene (like " +"``Main_Menu``) will effect the sensitivity for the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:218 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:219 msgid "" "All we're doing in ``load_new_scene`` is calling :ref:`SceneTree " "`'s ``change_scene`` function, passing in the scene path " "given in ``load_new_scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:220 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:221 msgid "" "That's all of the code needed for ``Globals.gd`` right now! Before we can " "test the main menu, we first need to set ``Globals.gd`` as an autoload " "script." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:222 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:223 msgid "Open up the project settings and click the ``AutoLoad`` tab." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:226 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:227 msgid "" "Then select the path to ``Globals.gd`` in the ``Path`` field by clicking the " "button beside it. Make sure the name in the ``Node Name`` field is " @@ -29126,51 +29199,52 @@ msgid "" "``Add``!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:229 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:230 msgid "" "This will make ``Globals.gd`` a singleton/autoload script, which will allow " -"us to access it from anywhere in any scene." +"us to access it from any script, in any scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:231 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:232 msgid "" "For more information on singleton/autoload scripts, see :ref:" "`doc_singletons_autoload`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:233 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:234 msgid "" "Now that ``Globals.gd`` is a singleton/autoload script, you can test the " "main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:235 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:236 msgid "" -"You may also want to change the main scene from ``Testing_Area.tscn`` to " -"``Main_Menu.tscn`` so when we export the game we start at the main menu. You " -"can do this through the project settings, under the ``General`` tab. Then in " -"the ``Application`` category, click the ``Run`` subcategory and you can " -"change the main scene by changing the value in ``Main Scene``." +"You may want to change the main scene from ``Testing_Area.tscn`` to " +"``Main_Menu.tscn`` so when we export the game the player will start at the " +"main menu. You can do this through the project settings, under the " +"``General`` tab. Then in the ``Application`` category, click the ``Run`` " +"subcategory and you can change the main scene by changing the value in " +"``Main Scene``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:239 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:240 msgid "" "You'll have to set the paths to the correct files in ``Main_Menu`` in the " "editor before testing the main menu! Otherwise you will not be able to " "change scenes from the level select menu/screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:243 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:244 msgid "Adding the debug menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:245 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:246 msgid "" -"Now let's add a simple debugging scene so we can track things like FPS in " -"game. Open up ``Debug_Display.tscn``." +"Now let's add a simple debugging scene so the we can track things like FPS " +"(Frames Per Second) in game. Open up ``Debug_Display.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:247 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:248 msgid "" "You can see it's a :ref:`Panel ` positioned in the top right " "corner of the screen. It has three :ref:`Labels `, one for " @@ -29179,19 +29253,18 @@ msgid "" "with." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:250 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:251 msgid "" "Let's add the code needed to fill these :ref:`Labels `. Select " "``Debug_Display`` and create a new script called ``Debug_Display.gd``. Add " "the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:263 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:919 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:264 msgid "Let's go over what this script does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:267 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:268 msgid "" "In ``_ready`` we set the ``OS_Label``'s text to the name provided in :ref:" "`OS ` using the ``get_name`` function. This will return the name " @@ -29200,80 +29273,86 @@ msgid "" "running Linux it will return ``X11``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:271 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:272 msgid "" "Then we set the ``Engine_Label``'s text to the version info provided by " "``Engine.get_version_info``. ``Engine.get_version_info`` returns a " "dictionary full of useful information about the version Godot is currently " -"running with. We only care for the string version for the purposes of this " -"display, so we get the string and assign that as the ``text`` in " -"``Engine_Label``. See :ref:`Engine ` for more information on " -"the values ``get_version_info`` returns." +"running with. We only care for the string version, for this label at least, " +"so we get the string and assign that as the ``text`` in ``Engine_Label``. " +"See :ref:`Engine ` for more information on the values " +"``get_version_info`` returns." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:275 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:276 msgid "" "In ``_process`` we set the text of the ``FPS_Label`` to ``Engine." "get_frames_per_second``, but because ``get_frames_per_second`` returns a " "integer, we have to cast it to a string using ``str`` before we can add it " -"to our label." +"to the :ref:`Label `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:280 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:281 msgid "" "Now let's jump back to ``Main_Menu.gd`` and change the following in " "``options_menu_button_pressed``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:287 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:288 msgid "to this instead:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:294 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:295 msgid "" "This will call a new function in our singleton called ``set_debug_display``, " "so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:298 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 -msgid "Open up ``Globals.gd`` and add the following global variables:" -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:312 -msgid "``canvas_layer``: A canvas layer so our GUI/UI is always drawn on top." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:299 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:390 +msgid "Open up ``Globals.gd`` and add the following class variables:" msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:313 -msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." +msgid "" +"``canvas_layer``: A canvas layer so the GUI/UI created in ``Globals.gd`` is " +"always drawn on top." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:314 -msgid "" -"``debug_display``: A variable to hold the debug display when there is one." +msgid "``DEBUG_DISPLAY``: The debug display scene we worked on earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:316 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:315 msgid "" -"Now that we have our global variables defined, we need to add a few lines to " -"ready so we have a canvas layer to use in ``canvas_layer``. Change " -"``_ready`` to the following:" +"``debug_display``: A variable to hold the debug display when/if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:325 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:317 msgid "" -"Now in ``_ready`` we're creating a new canvas layer and adding it as a child " -"of the autoload script." +"Now that we have the class variables defined, we need to add a few lines to " +"ready so ``Globals.gd`` will have a canvas layer to use (which we will store " +"in ``canvas_layer``). Change ``_ready`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:327 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:326 +msgid "" +"Now in ``_ready``, we creating a new canvas layer, assign it to " +"``canvas_layer`` and add it as a child. Because ``Globals.gd`` is a autoload/" +"singleton, Godot will make a :ref:`Node ` when the game is " +"launched, and it will have ``Globals.gd`` attached to it. Since Godot makes " +"a :ref:`Node `, we can treat ``Globals.gd`` like any other node " +"with regard to adding/removing children nodes." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 msgid "" "The reason we're adding a :ref:`CanvasLayer ` is so all " "of our GUI and UI nodes we instance/spawn in ``Globals.gd`` are always drawn " "on top of everything else." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:330 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:333 msgid "" "When adding nodes to a singleton/autoload, you have to be careful not to " "lose reference to any of the child nodes. This is because nodes will not be " @@ -29282,42 +29361,42 @@ msgid "" "them." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:336 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:339 msgid "Now we need to add ``set_debug_display`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:352 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:355 msgid "" -"First we check to see if we're trying to turn on the debug display, or turn " -"it off." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:354 -msgid "" -"If we are turning off the display, we then check to see if ``debug_display`` " -"is not equal to ``null``. If ``debug_display`` is not equal to ``null``, " -"then we most have a debug display currently active. If we have a debug " -"display active, we free it using ``queue_free`` and then assign " -"``debug_display`` to ``null``." +"First we check to see if ``Globals.gd`` is trying to turn on the debug " +"display, or turn it off." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:357 msgid "" -"If we are turning on the display, we then check to make sure we do not " -"already have a debug display active. We do this by making sure " -"``debug_display`` is equal to ``null``. If ``debug_display`` is ``null``, we " -"instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child of " -"``canvas_layer``." +"If ``Globals.gd`` is turning off the display, we then check to see if " +"``debug_display`` is not equal to ``null``. If ``debug_display`` is not " +"equal to ``null``, then ``Globals.gd`` must have a debug display currently " +"active. If ``Globals.gd`` has a debug display active, we free it using " +"``queue_free`` and then assign ``debug_display`` to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:362 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:360 +msgid "" +"If ``Globals.gd`` is turning on the display, we then check to make sure " +"``Globals.gd`` do not already have a debug display active. We do this by " +"making sure ``debug_display`` is equal to ``null``. If ``debug_display`` is " +"``null``, we instance a new ``DEBUG_DISPLAY_SCENE``, and add it as a child " +"of ``canvas_layer``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:366 msgid "" "With that done, we can now toggle the debug display on and off by switching " "the :ref:`CheckButton ` in the ``Options_Menu`` panel. Go " "give it a try!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:364 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:368 msgid "" "Notice how the debug display stays even when you change scenes from the " "``Main_Menu.tscn`` to another scene (like ``Testing_Area.tscn``). This is " @@ -29327,21 +29406,21 @@ msgid "" "running, without any additional work on our part!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:369 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 msgid "Adding a pause menu" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:371 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 msgid "" "Let's add a pause menu so we can return to the main menu when we press the " "``ui_cancel`` action." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:373 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:377 msgid "Open up ``Pause_Popup.tscn``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:375 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:379 msgid "" "Notice how the root node in ``Pause_Popup`` is a :ref:`WindowDialog " "`. :ref:`WindowDialog ` inherits " @@ -29349,7 +29428,7 @@ msgid "" "` can act like a popup." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:378 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 msgid "" "Select ``Pause_Popup`` and scroll down all the way till you get to the " "``Pause`` menu in the inspector. Notice how the pause mode is set to " @@ -29358,7 +29437,7 @@ msgid "" "which we need in order to interact with the UI elements." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:382 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:386 msgid "" "Now that we've looked at how ``Pause_Popup.tscn`` is set up, lets write the " "code to make it work. Normally we'd attach a script to the root node of the " @@ -29367,412 +29446,417 @@ msgid "" "up there." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:394 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 msgid "``MAIN_MENU_PATH``: The path to the main menu scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:395 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:399 msgid "``POPUP_SCENE``: The pop up scene we looked at earlier." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:396 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:400 msgid "``popup``: A variable to hold the pop up scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:398 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:402 msgid "" -"Now we need to add ``_process`` to ``Globals.gd`` so we can respond when the " +"Now we need to add ``_process`` to ``Globals.gd`` so it can respond when the " "``ui_cancel`` action is pressed. Add the following to ``_process``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:423 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:427 msgid "" "First we check to see if the ``ui_cancel`` action is pressed. Then we check " -"to make sure we do not already have a ``popup`` open by checking to see if " -"``popup`` is equal to ``null``." +"to make sure ``Globals.gd`` does not already have a ``popup`` open by " +"checking to see if ``popup`` is equal to ``null``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:426 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 msgid "" -"If we do not have a pop up open, we instance ``POPUP_SCENE`` and assign it " -"to ``popup``." +"If ``Globals.gd`` do not have a pop up open, we instance ``POPUP_SCENE`` and " +"assign it to ``popup``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:428 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:432 msgid "" "We then get the quit button and assign it's ``pressed`` signal to " "``popup_quit``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:430 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:434 msgid "" "Next we assign both the ``popup_hide`` signal from the :ref:`WindowDialog " "` and the ``pressed`` signal from the resume button to " "``popup_closed``, which we will be adding shortly." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:433 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:437 msgid "" "Then we add ``popup`` as a child of ``canvas_layer`` so it's drawn on top. " "We then tell ``popup`` to pop up at the center of the screen using " "``popup_centered``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:435 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:439 msgid "" -"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` to we can " -"interact with the pop up. If we did not do this, we would not be able to " -"interact with the pop up in any scene where the mouse mode is " +"Next we make sure the mouse mode is ``MOUSE_MODE_VISIBLE`` so the player can " +"interact with the pop up. If we did not do this, the player would not be " +"able to interact with the pop up in any scene where the mouse mode is " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:438 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:442 msgid "Finally, get pause the entire :ref:`SceneTree `." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:440 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 msgid "For more information on pausing in Godot, see :ref:`doc_pausing_games`" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:444 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:448 msgid "" "Now we need to add the functions we've connected the signals to. Let's add " "``popup_closed`` first." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:446 -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:450 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:465 msgid "Add the following to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:457 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:461 msgid "" "``popup_closed`` will resume the game and destroy the pop up if there is one." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:459 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:463 msgid "" "``popup_quit`` is similar, but we're also making sure the mouse is visible " "and changing scenes to the title screen." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:476 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:480 msgid "" "``popup_quit`` will resume the game, set the mouse mode to " "``MOUSE_MODE_VISIBLE`` to ensure the mouse is visible in the main menu, " "destroy the pop up if there is one, and change scenes to the main menu." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:481 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:485 msgid "" "Before we're ready to test the pop up, we should change one thing in " "``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:483 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:487 msgid "" "Open up ``Player.gd`` and in ``process_input``, change the code for " "capturing/freeing the cursor to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:490 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:494 msgid "" "Now instead of capturing/freeing the mouse, we check to see if the current " "mouse mode is ``MOUSE_MODE_VISIBLE``. If it is, we set it back to " "``MOUSE_MODE_CAPTURED``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:493 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 msgid "" "Because the pop up makes the mouse mode ``MOUSE_MODE_VISIBLE`` whenever you " "pause, we no longer have to worry about freeing the cursor in ``Player.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:497 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:501 msgid "" "Now the pause menu pop up is finished. You can now pause at any point in the " "game and return to the main menu!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:500 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 msgid "Starting the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:502 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:506 msgid "" -"Since our player can lose all their health, it would be ideal if our players " -"died and respawned too, so let's add that!" +"Since the player can lose all their health, it would be ideal if the player " +"died and respawned too, so let's add that next!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:504 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:508 msgid "" -"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there's a :ref:" -"`ColorRect ` called ``Death_Screen``. When the player dies, " -"we're going to make ``Death_Screen`` visible, and show them how long they " -"have to wait before they're able to respawn." +"First, open up ``Player.tscn`` and expand ``HUD``. Notice how there is a :" +"ref:`ColorRect ` called ``Death_Screen``. When the player " +"dies, we're going to make ``Death_Screen`` visible, and show them how long " +"they have to wait before the player is able to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:517 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:521 msgid "``RESPAWN_TIME``: The amount of time (in seconds) it takes to respawn." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:518 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:522 msgid "``dead_time``: A variable to track how long the player has been dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:519 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:523 msgid "" "``is_dead``: A variable to track whether or not the player is currently dead." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:520 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 msgid "``globals``: A variable to hold the ``Globals.gd`` singleton." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:524 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:528 msgid "" "We now need to add a couple lines to ``_ready``, so we can use ``Globals." -"gd``. Add the following to ``_ready``:" +"gd`` in ``Player.gd``. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:532 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:536 msgid "" "Now we're getting the ``Globals.gd`` singleton and assigning it to " -"``globals``. We also set our global position using the origin from our " -"global :ref:`Transform ` to the position returned by " -"``globals.get_respawn_position``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:535 -msgid "Don't worry, we'll add ``get_respawn_position`` further below!" +"``globals``. We also set the player's global position by setting the origin " +"in the player's global :ref:`Transform ` to the position " +"returned by ``globals.get_respawn_position``." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:539 +msgid "Don't worry, we will be adding ``get_respawn_position`` further below!" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:543 msgid "" "Next we need to make a few changes to ``physics_process``. Change " "``physics_processing`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:557 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:561 msgid "" -"Now we're not processing input or movement input when we're dead. We're also " -"now calling ``process_respawn``, but we haven't written ``process_respawn`` " -"yet, so let's change that." +"Now the player will not be processing input or movement input when the " +"player is dead. We are also now calling ``process_respawn``. We have not " +"made ``process_respawn`` yet, so let's change that." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:562 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:566 msgid "Let's add ``process_respawn``. Add the following to ``Player.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:621 -msgid "Let's go through what this function is doing." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:625 -msgid "" -"First we check to see if we just died by checking to see if ``health`` is " -"equal or less than ``0`` and ``is_dead`` is ``false``." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:627 -msgid "" -"If we just died, we disable our collision shapes for the player. We do this " -"to make sure we're not blocking anything with our dead body." +msgid "Let's go through what this function is doing." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:629 msgid "" -"We next set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " -"to ``UNARMED``. This is so if we are using a weapon, we put it away when we " -"die." +"First we check to see if the player has just died by checking to see if " +"``health`` is equal or less than ``0`` and ``is_dead`` is ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:632 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:631 +msgid "" +"If the player has just died, we disable the collision shapes for the player. " +"We do this to make sure the player is not blocking anything with their dead " +"body." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:633 +msgid "" +"Next we set ``changing_weapon`` to ``true`` and set ``changing_weapon_name`` " +"to ``UNARMED``. This is so if the player is using a weapon, it is put away " +"when the player dies." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:636 msgid "" "We then make the ``Death_Screen`` :ref:`ColorRect ` visible " -"so we get a nice grey overlay over everything. We then make the rest of the " -"UI, the ``Panel`` and ``Crosshair`` nodes, invisible." +"so the player gets a nice grey overlay over everything when they have died. " +"We then make the rest of the UI, the ``Panel`` and ``Crosshair`` nodes, " +"invisible." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:635 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:639 msgid "" "Next we set ``dead_time`` to ``RESPAWN_TIME`` so we can start counting down " -"how long we've been dead. We also set ``is_dead`` to ``true`` so we know " -"we've died." +"how long the player has been dead. We also set ``is_dead`` to ``true`` so we " +"know the player has died." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:637 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:641 msgid "" -"If we are holding an object when we died, we need to throw it. We first " -"check to see if we are holding an object or not. If we are, we then throw " -"it, using the same code as the throwing code we added in :ref:" -"`doc_fps_tutorial_part_five`." +"If the player is holding an object when they died, we need to throw it. We " +"first check to see if the player is holding an object or not. If the player " +"is holding a object, we throw it using the same code as the throwing code we " +"added in :ref:`doc_fps_tutorial_part_five`." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:642 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:646 msgid "" -"Then we check to see if we are dead. If we are, we then remove ``delta`` " -"from ``dead_time``." +"Then we check to see if the player is dead. If the player is dead, we then " +"remove ``delta`` from ``dead_time``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:644 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:648 msgid "" "We then make a new variable called ``dead_time_pretty``, where we convert " "``dead_time`` to a string, using only the first three characters starting " -"from the left. This gives us a nice looking string showing how much time we " -"have left to wait before we respawn." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:647 -msgid "" -"We then change the :ref:`Label ` in ``Death_Screen`` to show " -"how much time we have left." -msgstr "" - -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:649 -msgid "" -"Next we check to see if we've waited long enough and can respawn. We do this " -"by checking to see if ``dead_time`` is ``0`` or less." +"from the left. This gives the player a nice looking string showing how much " +"time the player has left to wait before the player can respawn." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:651 msgid "" -"If we have waited long enough to respawn, we set the player's position to a " -"new respawn position provided by ``get_respawn_position``." +"We then change the :ref:`Label ` in ``Death_Screen`` to show " +"how much time the player has left." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:653 msgid "" -"We then enable both of our collision shapes so the player can collide with " -"the environment." +"Next we check to see if the player has waited long enough and can respawn. " +"We do this by checking to see if ``dead_time`` is ``0`` or less." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:655 msgid "" +"If the player has waited long enough to respawn, we set the player's " +"position to a new respawn position provided by ``get_respawn_position``." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +msgid "" +"We then enable both of the player's collision shapes so the player can " +"collide with the environment." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +msgid "" "Next we make the ``Death_Screen`` invisible and make the rest of the UI, the " "``Panel`` and ``Crosshair`` nodes, visible again." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:657 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 msgid "" -"We then go through each weapon and call it's ``reset_weapon`` function. " -"We'll add ``reset_weapon`` soon." +"We then go through each weapon and call it's ``reset_weapon`` function, " +"which we will add soon." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:659 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:663 msgid "" "Then we reset ``health`` to ``100``, ``grenade_amounts`` to it's default " -"values, and change ``current_grenade`` to ``Grenade``." +"values, and change ``current_grenade`` to ``Grenade``. This effectively " +"resets these variables to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:661 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:666 msgid "Finally, we set ``is_dead`` to ``false``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:665 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:670 msgid "" "Before we leave ``Player.gd``, we need to add one quick thing to ``_input``. " "Add the following at the beginning of ``_input``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:672 -msgid "Now when we're dead we cannot look around with the mouse." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +msgid "" +"Now when the player is dead, the player cannot look around with the mouse." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:675 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:680 msgid "Finishing the respawn system" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:677 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:682 msgid "" "First let's open ``Weapon_Pistol.gd`` and add the ``reset_weapon`` function. " "Add the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:685 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:690 msgid "" -"Now when we call ``reset_weapon``, the ammo in our weapon and the ammo in " +"Now when we call ``reset_weapon``, the ammo in the pistol and the ammo in " "the spares will be reset to their default values." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:687 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:692 msgid "Now let's add ``reset_weapon`` in ``Weapon_Rifle.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:695 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:700 msgid "And add the following to ``Weapon_Knife.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:703 -msgid "Now our weapons will reset when we die." +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:708 +msgid "Now all of the weapons will reset when the player dies." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:707 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:712 msgid "" "Now we need to add a few things to ``Globals.gd``. First, add the following " -"global variable:" +"class variable:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:713 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:718 msgid "" "``respawn_points``: A variable to hold all of the respawn points in a level" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:715 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:720 msgid "" "Because we're getting a random spawn point each time, we need to randomize " "the number generator. Add the following to ``_ready``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:721 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:726 msgid "" "``randomize`` will get us a new random seed so we get a (relatively) random " "string of numbers when we using any of the random functions." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:723 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:728 msgid "Now let's add ``get_respawn_position`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:738 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:743 msgid "" -"First we check to see if we have any ``respawn_points`` by checking to see " -"if ``respawn_points`` is ``null`` or not." +"First we check to see if ``Globals.gd`` has any ``respawn_points`` by " +"checking to see if ``respawn_points`` is ``null`` or not." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:740 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 msgid "" "If ``respawn_points`` is ``null``, we return a position of empty :ref:" "`Vector 3 ` with the position ``(0, 0, 0)``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:742 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:747 msgid "" "If ``respawn_points`` is not ``null``, we then get a random number between " "``0`` and the number of elements we have in ``respawn_points``, minus ``1`` " -"since most programming languages (including ``GDScript``) start counting " +"since most programming languages, including ``GDScript``, start counting " "from ``0`` when you are accessing elements in a list." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:745 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:750 msgid "" "We then return the position of the :ref:`Spatial ` node at " "``respawn_point`` position in ``respawn_points``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:749 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:754 msgid "" -"Before we're done with ``Globals.gd``. We need to add the following to " +"Before we are done with ``Globals.gd``. We need to add the following to " "``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:755 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 msgid "" -"We set ``respawn_points`` to ``null`` so when/if we get to a level with no " -"respawn points, we do not respawn at the respawn points in the level prior." +"We set ``respawn_points`` to ``null`` so when/if the player gets to a level " +"with no respawn points, we do not respawn the player at the respawn points " +"that were in the level prior." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:760 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:765 msgid "" "Now all we need is a way to set the respawn points. Open up ``Ruins_Level." "tscn`` and select ``Spawn_Points``. Add a new script called " @@ -29780,7 +29864,7 @@ msgid "" "following to ``Respawn_Point_Setter.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:771 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:776 msgid "" "Now when a node with ``Respawn_Point_Setter.gd`` has it's ``_ready`` " "function called, all of the children nodes of the node with " @@ -29788,301 +29872,314 @@ msgid "" "tscn``, will be added to ``respawn_points`` in ``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:775 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 msgid "" "Any node with ``Respawn_Point_Setter.gd`` has to be above the player in the :" "ref:`SceneTree ` so the respawn points are set before the " "player needs them in the player's ``_ready`` function." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:780 -msgid "Now when you die you'll respawn after waiting ``4`` seconds!" +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:785 +msgid "" +"Now when the player dies, they will respawn after waiting ``4`` seconds!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:782 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:787 msgid "" "No spawn points are already set up for any of the levels besides " "``Ruins_Level.tscn``! Adding spawn points to ``Space_Level.tscn`` is left as " "an exercise for the reader." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:786 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:791 msgid "Writing a sound system we can use anywhere" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:788 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:793 msgid "" "Finally, lets make a sound system so we can play sounds from anywhere, " "without having to use the player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:790 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:795 msgid "First, open up ``SimpleAudioPlayer.gd`` and change it to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:833 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:838 msgid "" -"There's several changes from the old version, first and foremost being we're " -"no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. This " -"is much better for performance since we're no longer loading each audio clip " -"when we create a sound, but instead we're forcing a audio stream to be " +"There are several changes from the old version, first and foremost being we " +"are no longer storing the sound files in ``SimpleAudioPlayer.gd`` anymore. " +"This is much better for performance since we're no longer loading each audio " +"clip when we create a sound, but instead we are forcing a audio stream to be " "passed in to ``play_sound``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:837 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:842 msgid "" -"Another change is we have a new global variable called ``should_loop``. " +"Another change is we have a new class variable called ``should_loop``. " "Instead of just destroying the audio player every time it's finished, we " -"instead want check to see if we are set to loop or not. This allows us to " -"have audio like looping background music without having to spawn a new audio " -"player with the music when the old one is finished." +"instead want check to see if the audio player is set to loop or not. This " +"allows us to have audio like looping background music without having to " +"spawn a new audio player with the music when the old one is finished." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:841 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:846 msgid "" -"Finally, instead of being instanced/spawned in ``Player.gd``, we're instead " -"going to be spawned in ``Globals.gd`` so we can create sounds from any " -"scene. We now need to store the ``Globals.gd`` singleton so when we destroy " -"the audio player, we also remove it from a list in ``Globals.gd``." +"Finally, instead of being instanced/spawned in ``Player.gd``, the audio " +"player is instead going to be spawned in ``Globals.gd`` so we can create " +"sounds from any scene. Now the audio player stores ``Globals.gd`` singleton " +"so when the audio player is destroyed, we can also remove it from a list in " +"``Globals.gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:844 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:849 msgid "Let's go over the changes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:848 -msgid "" -"For the global variables we removed all of the ``audio_[insert name here]`` " -"variables since we will instead have these passed in to. We also added two " -"new global variables, ``should_loop`` and ``globals``. We'll use " -"``should_loop`` to tell whether we want to loop when the sound has finished, " -"and ``globals`` will hold the ``Globals.gd`` singleton." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:853 msgid "" -"The only change in ``_ready`` is now we're getting the ``Globals.gd`` " -"singleton and assigning it to ``globals``" +"For the class variables we removed all of the ``audio_[insert name here]`` " +"variables since we will instead have these passed in." msgstr "" #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:855 msgid "" -"In ``play_sound`` we now expect a audio stream, named ``audio_stream``, to " -"be passed in, instead of ``sound_name``. Instead of checking the sound name " -"and setting the stream for the audio player, we instead check to make sure " -"an audio stream was passed in. If a audio stream is not passed in, we print " -"an error message, remove the audio player from a list in the ``Globals.gd`` " +"We also added two new class variables, ``should_loop`` and ``globals``. " +"We'll use ``should_loop`` to tell whether the audio player should loop when " +"the sound has finished, and ``globals`` will hold the ``Globals.gd`` " +"singleton." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:858 +msgid "" +"The only change in ``_ready`` is now audio player is getting the ``Globals." +"gd`` singleton and assigning it to ``globals``" +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:860 +msgid "" +"``play_sound`` now expects a audio stream, named ``audio_stream``, to be " +"passed in, instead of ``sound_name``. Instead of checking the sound name and " +"setting the stream for the audio player, we instead check to make sure an " +"audio stream was passed in. If a audio stream is not passed in, we print an " +"error message, remove the audio player from a list in the ``Globals.gd`` " "singleton called ``created_audio``, and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:859 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:864 msgid "" -"Finally, in ``sound_finished`` we first check to see if we are supposed to " -"loop or not using ``should_loop``. If we are supposed to loop, we play the " -"sound again from the start of the audio, at position ``0.0``. If we are not " -"supposed to loop, we remove the audio player from a list in the ``Globals." -"gd`` singleton called ``created_audio``, and then free the audio player." +"Finally, in ``sound_finished`` we first check to see if the audio player is " +"supposed to loop or not using ``should_loop``. If the audio player is " +"supposed to loop, we play the sound again from the start, at position " +"``0.0``. If the audio player is not supposed to loop, we remove the audio " +"player from a list in the ``Globals.gd`` singleton called ``created_audio``, " +"and then free the audio player." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:865 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:870 msgid "" "Now that we've finished our changes to ``SimpleAudioPlayer.gd``, we now need " -"to turn our attention to ``Globals.gd``. First, add the following global " +"to turn our attention to ``Globals.gd``. First, add the following class " "variables:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:883 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:888 msgid "Lets go over these global variables." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:885 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:890 msgid "" -"``audio_clips``: A dictionary holding all of the audio clips we can play." +"``audio_clips``: A dictionary holding all of the audio clips ``Globals.gd`` " +"can play." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:886 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:891 msgid "``SIMPLE_AUDIO_PLAYER_SCENE``: The simple audio player scene." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:887 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 msgid "" -"``created_audio``: A list to hold all of the simple audio players we create" +"``created_audio``: A list to hold all of the simple audio players ``Globals." +"gd`` has created" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:889 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:894 msgid "" "If you want to add additional audio, you need to add it to ``audio_clips``. " "No audio files are provided in this tutorial, so you will have to provide " "your own." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:892 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 msgid "" "One site I'd recommend is **GameSounds.xyz**. I'm using the Gamemaster audio " "gun sound pack included in the Sonniss' GDC Game Audio bundle for 2017. The " "tracks I've used (with some minor editing) are as follows:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:896 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:901 msgid "gun_revolver_pistol_shot_04," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:897 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 msgid "gun_semi_auto_rifle_cock_02," msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:898 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:903 msgid "gun_submachine_auto_shot_00_automatic_preview_01" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:902 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:907 msgid "" "Now we need to add a new function called ``play_sound`` to ``Globals.gd``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:921 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:926 msgid "" -"First we check to see if we have a audio clip with the name ``sound_name`` " -"in ``audio_clips``. If we do not, we print an error message." +"First we check to see if ``Globals.gd`` has a audio clip with the name " +"``sound_name`` in ``audio_clips``. If it does not, we print an error message." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:923 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:928 msgid "" -"If we do have a audio clip with the name ``sound_name``, we then instance/" -"spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to ``new_audio``." +"If ``Globals.gd`` has a audio clip with the name ``sound_name``, we then " +"instance/spawn a new ``SIMPLE_AUDIO_PLAYER_SCENE`` and assign it to " +"``new_audio``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:925 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:930 msgid "" "We then set ``should_loop``, and add ``new_audio`` as a child of ``Globals." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:927 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:932 msgid "" "Remember, we have to be careful adding nodes to a singleton, since these " "nodes will not be destroyed when changing scenes." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:929 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:934 msgid "" "We then call ``play_sound``, passing in the audio clip associated with " -"``sound_name``, and the sound position." +"``sound_name`` and the sound position." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:933 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:938 msgid "" "Before we leave ``Globals.gd``, we need to add a few lines of code to " -"``load_new_scene`` so when we change scenes, we destroy all of the audio." +"``load_new_scene`` so when the player changes scenes, all of the audio is " +"destroyed." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:935 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:940 msgid "Add the following to ``load_new_scene``:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:944 -msgid "" -"Now before we change scenes we go through each simple audio player in " -"``created_sounds`` and free/destroy them. Once we've gone through all of the " -"sounds in ``created_audio``, we clear ``created_audio`` so it no longer " -"holds any references to any of the previously created simple audio players." -msgstr "" - #: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:949 msgid "" +"Now before ``Globals.gd`` changes scenes, it goes through each simple audio " +"player in ``created_sounds`` and frees/destroys them. Once ``Globals.gd`` " +"has gone through all of the sounds in ``created_audio``, we clear " +"``created_audio`` so it no longer holds any references to any (noew freed/" +"destroyed) simple audio players." +msgstr "" + +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:954 +msgid "" "Let's change ``create_sound`` in ``Player.gd`` to use this new system. " -"First, remove ``simple_audio_player`` from ``Player.gd``'s global variables, " -"since we will no longer be directly instancing/spawning sounds from ``Player." +"First, remove ``simple_audio_player`` from ``Player.gd``'s class variables, " +"since we will no longer be directly instancing/spawning sounds in ``Player." "gd``." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:952 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:957 msgid "Now, change ``create_sound`` to the following:" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:959 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:964 msgid "" "Now whenever ``create_sound`` is called, we simply call ``play_sound`` in " -"``Globals.gd``, passing in all of the arguments we've revived." +"``Globals.gd``, passing in all of the arguments revived." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:963 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:968 msgid "" "Now all of the sounds in our FPS can be played from anywhere. All we have to " -"do is get the ``Globals.gd`` singleton, and call ``play_sound``, passing in " -"the name of the sound we want to play, whether we want it to loop or not, " -"and the position to play the sound from." +"do is get the ``Globals.gd`` singleton, and call ``play_sound``, pass in the " +"name of the sound we want to play, whether we want it to loop or not, and " +"the position to play the sound from." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:966 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:971 msgid "" "For example, if you want to play an explosion sound when the grenades " "explode you'd need to add a new sound to ``audio_clips`` in ``Globals.gd``, " "get the ``Globals.gd`` singleton, and then you just need to add something " "like ``globals.play_sound(\"explosion\", false, global_transform.origin)`` " "in the grenades ``_process`` function, right after the grenade damages all " -"of the bodies within it's blast radius." +"of the bodies within its blast radius." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:976 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:981 msgid "Now you have a fully working single player FPS!" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:978 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:983 msgid "At this point you have a good base to build more complicated FPS games." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:982 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 msgid "" "You can download the finished project for the entire tutorial here: :" "download:`Godot_FPS_Part_6.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:984 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:989 msgid "" "The finished project source files contain the same exact code, just written " "in a different order. This is because the finished project source files are " "what the tutorial is based on." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:987 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:992 msgid "" "The finished project code was written in the order that features were " "created, not necessarily in a order that is ideal for learning." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:990 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 msgid "" "Other than that, the source is exactly the same, just with helpful comments " "explaining what each part does." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:993 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:998 msgid "" "The finished project source is hosted on Github as well: https://github.com/" "TwistedTwigleg/Godot_FPS_Tutorial" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:995 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 msgid "" "**Please note that the code in Github may or may not be in sync with the " "tutorial on the documentation**." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:997 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 msgid "" "The code in the documentation is likely better managed and/or more up to " "date. If you are unsure on which to use, use the project(s) provided in the " "documentation as they are maintained by the Godot community." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1000 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1005 msgid "" "You can download all of the ``.blend`` files used in this tutorial here: :" "download:`Godot_FPS_BlenderFiles.zip `" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1002 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 msgid "" "All assets provided in the started assets (unless otherwise noted) were " "**originally created by TwistedTwigleg, with changes/additions by the Godot " @@ -30090,26 +30187,26 @@ msgid "" "under the ``MIT`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1007 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 msgid "" "The skybox is created by **StumpyStrust** and can be found at OpenGameArt." "org. https://opengameart.org/content/space-skyboxes-0 . The skybox is " "licensed under the ``CC0`` license." msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1012 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1017 msgid "" "The skybox was convert to a 360 equirectangular image using this tool: " "https://www.360toolkit.co/convert-cubemap-to-spherical-equirectangular.html" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1014 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1019 msgid "" "While no sounds are provided, you can find many game ready sounds at https://" "gamesounds.xyz/" msgstr "" -#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1016 +#: ../../docs/tutorials/3d/fps_tutorial/part_six.rst:1021 msgid "" "**OpenGameArt.org, 360toolkit.co, the creator(s) of Titillium-Regular, " "StumpyStrust, and GameSounds.xyz are in no way involved in this tutorial.**" @@ -34692,6 +34789,7 @@ msgstr "" #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/animation/cutout_animation.rst:279 +#: ../../docs/development/file_formats/tscn.rst:365 msgid "Animation" msgstr "" @@ -36881,7 +36979,7 @@ msgstr "" #: ../../docs/tutorials/i18n/internationalizing_games.rst:30 msgid "" "The translations can get updated and re-imported when they change, but they " -"still have to be added to the project. This is done in Scene > Project " +"still have to be added to the project. This is done in Project > Project " "Settings > Localization:" msgstr "" @@ -46893,6 +46991,415 @@ msgid "" "presto:" msgstr "" +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:4 +msgid "GDNative C++ example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:8 +msgid "" +"This tutorial builds on top of the information given in the :ref:`GDNative C " +"example ` so we highly recommend you read that first." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:10 +msgid "" +"The C++ bindings for GDNative are build on top of the nativescript GDNative " +"API and provide a nicer way to \"extend\" nodes in Godot using C++. " +"Basically this is the equivalent to writing GDScript scripts but in C++." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:12 +msgid "" +"We'll be looking at nativescript 1.0 which is available in Godot 3.0. Godot " +"3.1 will see the introduction of nativescript 1.1 which has a number of " +"improvements. We'll update this tutorial once that is officially released " +"but the overal structure is much the same." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:14 +msgid "" +"You can download the full example we'll be creating in this tutorial here: " +"https://github.com/BastiaanOlij/gdnative_cpp_example" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:17 +msgid "Setting up your project" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:18 +msgid "There are a few prerequisites you'll need:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:20 +msgid "A Godot 3.x executable" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:21 +msgid "a C++ compiler" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:22 +msgid "scons as a build tool" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:23 +msgid "" +"a copy of the godot_headers repository you can find here: https://github.com/" +"GodotNativeTools/godot_headers" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:24 +msgid "" +"a copy of the godot_cpp repository you can find here: https://github.com/" +"GodotNativeTools/godot-cpp" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:26 +msgid "" +"See also http://docs.godotengine.org/en/latest/development/compiling/index." +"html as the build tools are identical to those you need to compile Godot " +"from source." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:28 +msgid "" +"You can just download these repositories from GitHub or let git do all the " +"work for you. I've started to submodule them into my project folder. This is " +"how I usually start my projects:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:38 +msgid "" +"You don't have to do it this way but I've found it easiest to manage. If you " +"decide to just download the repositories or just clone them into your " +"folder, makes sure to keep the folder layout the same as I've setup here as " +"much of the code we'll be showcasing here assumes the project has this " +"layout." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:40 +msgid "" +"If you downloaded or cloned my example from the link specified in the " +"introduction the submodules aren't automatically included. You will need to " +"execute the following:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:48 +msgid "" +"This will trigger downloading these two repositories into your project " +"folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:51 +msgid "Building the C++ bindings" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:52 +msgid "" +"Now that we've downloaded our prerequisites it is time to build our C++ " +"bindings." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:54 +msgid "" +"Now the repository contains a copy of the meta data for the current Godot " +"release but if you need to build these bindings for a newer version of Godot " +"you simply call the godot executable:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:60 +msgid "And place the resulting godot_api.json file in our godot-cpp folder." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:62 +msgid "" +"Now to generate and compile our bindings we do (do chose either Windows, " +"Linux or OSX):" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:70 +msgid "" +"This step will take a while but at the end of it, you should have static " +"libraries you can compile into your project stored in godot-cpp/bin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:72 +msgid "" +"At some point we'll probably start making compiled binaries available for " +"download so you can skip this whole section." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:75 +msgid "Creating a simple plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:76 +msgid "Now it's time to build an actual plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:78 +msgid "" +"To start we want to create an empty Godot project in which we'll be able to " +"place a few files so open up Godot and create a new project. I like to place " +"an demo project in my repository that shows how my GDNative module works so " +"for our example we'll create a project in a folder called \"demo\" inside of " +"our GDNative modules folder structure." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:80 +msgid "" +"Inside our demo we'll create a scene with a single Node of type Node called " +"\"Main\" and we'll save this as main.tscn. We'll come back to that later." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:82 +msgid "" +"Back in the top-level gdnative module folder, we're also going to create a " +"subfolder called ``src`` into which we'll place our source files." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:84 +msgid "" +"You should now have ``demo``, ``godot-cpp``, ``godot_headers``, and ``src`` " +"directories in your gdnative module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:86 +msgid "" +"In the ``src`` folder, we'll start with creating our header file for the " +"GDNative node we'll be creating. This we'll call ``gdexample.h``:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:117 +msgid "" +"There are a few things of note to the above. We're including ``Godot.hpp`` " +"which contains all our basic definitions. After that we include ``Sprite." +"hpp`` which includes the bindings to our sprite class. This class we'll be " +"extending in our module." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:120 +msgid "" +"We're using the namespace ``godot``, everything in GDNative is defined " +"within this namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:122 +msgid "" +"Then we have our class definition and we see that we're inheriting from our " +"Sprite but through a container class. We'll see a few side effects from this " +"later on. This is also the main bit that is going to improve in nativescript " +"1.1. The GODOT_CLASS macro sets up a few internal things for us." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:125 +msgid "After that we declare a single member variables called ``time_passed``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:127 +msgid "" +"In the next block we're defining our methods, we obviously have our " +"constructor and destructor defined but there are two other functions that " +"will likely look familiar to some." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:129 +msgid "" +"The first is ``_register_methods`` which is a static function that Godot " +"will call to find out what our methods can be called on our native_script " +"and what properties it has. The second is our ``_process`` function which " +"will work exactly the same as the ``_process`` function you're used to using " +"in GDScript." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:132 +msgid "" +"So, let's implement our functions by creating our ``gdexample.cpp`` file:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:161 +msgid "" +"This one should be straight forward. We're implementing each method of our " +"class that we defined in our header file. Of note is the ``register_method`` " +"call that informs Godot that we have a ``_process`` method. We do not have " +"to tell Godot about our constructor nor destructor." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:163 +msgid "" +"The other method of note is our ``_process`` function where I'm simply " +"keeping track of how much time has passed and calculating a new position for " +"our sprite using a simple sine and cosine function. What does stand out is " +"calling ``owner->set_position`` to call one of the build in methods of our " +"Sprite. This is because our class is a container class and owner points to " +"the actual sprite node our script relates to. Once we can use nativescript " +"1.1 we'll be able to call ``set_position`` directly on our class." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:167 +msgid "" +"Now there is one more C++ file we need that we call ``gdlibrary.cpp``. Our " +"GDNative plugin can contain multiple native_scripts each one with their own " +"header and source file like we've implemented ``gdexample`` up above. What " +"we now need is a small bit of code that tells Godot about all the " +"native_scripts in our GDNative plugin." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:187 +msgid "" +"Note that we are not using our namespace here because the three functions " +"implemented here need to be defined without a namespace." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:189 +msgid "" +"The ``godot_gdnative_init`` and ``godot_gdnative_terminate`` functions get " +"called respectively when Godot loads our plugin and when it unloads it. All " +"we're doing here is parse through to the functions in our bindings module " +"that does some initialisation for us but you might have a need to setup more " +"things." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:191 +msgid "" +"The important function is the third function called " +"``godot_nativescript_init``. Again we first call a function in our bindings " +"library that does its usual stuff. After that we call the function " +"``register_class`` for each of our classes in our library." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:195 +msgid "Compiling our plugin" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:197 +msgid "" +"We can't really make pretty the ``SConstruct`` files used for building in " +"scons. For the purpose of this example, just use this hardcoded build file " +"we've prepared. We'll cover a more customizable, detailed example on how to " +"use these build files in a subsequent tutorial: :download:`SConstruct `" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:199 +msgid "" +"Once you've downloaded the ``SConstruct`` file, place it in your gdnative " +"module folder, beside ``godot-cpp``, ``godot_headers``, and ``demo``. Next " +"just run:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:205 +msgid "" +"And our module should compile. You should now be able to find your module in " +"``demo/bin/``" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:207 +msgid "" +"**Note**, we've compiled both godot-cpp and our gdexample library as debug " +"builds. For release you should recompile them using the ``target=release`` " +"switch." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:210 +msgid "Using your GDNative module" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:212 +msgid "" +"Before we jump back into Godot we need to create two more files. Both can " +"now be created through the interface in Godot but I find it easier to just " +"create them directly." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:214 +msgid "" +"The first is a file that lets Godot know what dynamic libraries should be " +"loaded for each platform and is called ``gdexample.gdnlib``." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:236 +msgid "" +"So what's in this file? Well there is a ``general`` section that controls " +"how our module is loaded. It also contains a prefix section which we should " +"leave on ``godot_`` for now. If you change this you'll need to rename " +"various functions that are used as entry points. This was added for the " +"iPhone platform because it doesn't allow dynamic libraries to be deployed " +"and GDNative modules are statically linked." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:238 +msgid "" +"The ``entry`` section is the important bit, it tells Godot for each platform " +"we support where our dynamic library is on disk. It will also result in just " +"that file being exported when you export your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:240 +msgid "" +"Finally the ``dependencies`` section allows you to name additional dynamic " +"libraries that should be included as well. This is important when your " +"GDNative plugin implements someone elses library and requires you to supply " +"a 3rd party dynamic library with your game." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:242 +msgid "" +"If you double click on the ``gdexample.gdnlib`` file within Godot you'll see " +"there are far more options to set:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:246 +msgid "" +"The second file we need to create is a file we need to create for each " +"native_script we've added to our plugin. We name it ``gdexample.gdns`` for " +"our gdexample native_script." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:261 +msgid "" +"This is a standard Godot resource and you could just create that directly " +"inside of your scene but having this as a resource file makes life a lot " +"easier in (re)using your native_script. The important bits here are that " +"we're pointing to our gdnlib file so Godot knows which dynamic library " +"contains our native_script, and the ``class_name`` which identifies the " +"natice_script in our plugin we want to use." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:264 +msgid "" +"Ok, we're all setup. Time to jump back into Godot. We load up the main scene " +"we created way back in the beginning and now we add a Sprite to our scene:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:268 +msgid "" +"We're going to assign our Godot logo to this sprite as our texture, turn off " +"centered, and drag our ``gdexample.gdns`` file onto the script property of " +"our sprite:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:272 +msgid "And we're ready to run our project:" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:277 +msgid "Next steps" +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:278 +msgid "" +"Obviously the above is a very basic example just to get you setup but we " +"hope it shows the basics. You can build upon this example to create full " +"fledged scripts to control the nodes in Godot but using C++ as the language." +msgstr "" + +#: ../../docs/tutorials/plugins/gdnative/gdnative-cpp-example.rst:280 +msgid "" +"You should be able to edit and recompile your plugin while the Godot editor " +"remains open and just rerun the project." +msgstr "" + #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" @@ -53248,126 +53755,42 @@ msgid "" "so on. For example, a spatial node looks like:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:66 -msgid "" -"Resources are components that make up the nodes. For example, a MeshInstance " -"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " -"may be either internal or external to the TSCN file." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:70 -msgid "" -"References to the resources are handled by id numbers in the resources " -"heading. External resources and internal resource are referred to with :code:" -"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " -"methods to refer to internal and external resource, you can have the same ID " -"for both an internal and external resource." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:76 -msgid "" -"For example, to refer to the resource :code:`[ext_resource id=3 type=" -"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:82 -msgid "External Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:84 -msgid "" -"External resources are links to resources not contained within the TSCN file " -"itself. An external resource consists of:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:87 -msgid "A path" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:88 -msgid "A type" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:89 -msgid "An ID" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:91 -msgid "" -"Godot alway generates absolute paths relative to the resource directory and " -"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " -"location are also valid." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:95 -msgid "Some example external resources are:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:104 -msgid "Internal Resources" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:106 -msgid "" -"A TSCN file can contain meshes, materials and other data, and these are " -"contained in the internal resources section of the file. The heading for an " -"internal resource looks similar to those of external resources, but does not " -"have a path. Internal resources also have :code:`key=value` pairs under each " -"heading. For example, a capsule collision shape looks like:" -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:119 -msgid "" -"Some internal resource contain links to other internal resources (such as a " -"mesh having a material). In this case, the referring resource must appear " -"before the reference to it. Thus, in the internal resources section of the " -"file, order does matter." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:124 -msgid "" -"Unfortunately, documentation on the formats for these subresources is " -"completely absent, and while some can be found through inspecting resources " -"of saved files, but others can only be found by looking through Godot's " -"source." -msgstr "" - -#: ../../docs/development/file_formats/tscn.rst:130 +#: ../../docs/development/file_formats/tscn.rst:64 msgid "The Scene Tree" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:132 +#: ../../docs/development/file_formats/tscn.rst:66 msgid "" "The scene tree is made up of ... nodes! The heading of each node consists of " "it's name, parent and (most of the time) a type. For example :code:`[node " "type=\"Camera\" name=\"PlayerCamera\" parent=\"Player/Head\"]`" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:136 +#: ../../docs/development/file_formats/tscn.rst:70 msgid "Other valid keywords include:" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:138 +#: ../../docs/development/file_formats/tscn.rst:72 msgid "instance" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:139 +#: ../../docs/development/file_formats/tscn.rst:73 msgid "instance_placeholder" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:140 +#: ../../docs/development/file_formats/tscn.rst:74 msgid "owner" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:141 +#: ../../docs/development/file_formats/tscn.rst:75 msgid "index (if two nodes have the same name)" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:142 +#: ../../docs/development/file_formats/tscn.rst:76 msgid "groups" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:144 +#: ../../docs/development/file_formats/tscn.rst:78 msgid "" "The first node in the file should not have the :code:`parent=Path/To/Node` " "entry in it's heading, and it is the scene root. All scene files should have " @@ -53377,11 +53800,394 @@ msgid "" "\".\"`. Here is an example scene tree (but without any node content). ::" msgstr "" -#: ../../docs/development/file_formats/tscn.rst:157 +#: ../../docs/development/file_formats/tscn.rst:91 msgid "" -"Similar to the internal resource, the content for each node is currently " -"undocumented. Fortunately it is easy to find out because you can simply save " -"a file with that node in it. Some example nodes are:" +"Similar to the internal resource, the document for each node is currently " +"incomplete. Fortunately it is easy to find out because you can simply save a " +"file with that node in it. Some example nodes are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:129 +#, fuzzy +msgid "Node Path" +msgstr "資源路徑" + +#: ../../docs/development/file_formats/tscn.rst:131 +msgid "" +"A tree structure is not enough to represent the whole scene, Godot use a :" +"code:`NodePath(Path/To/Node)` structure to refer to another node or " +"attribute of the node anywhere in the scene tree. Some typical usages of " +"NodePath like mesh node use :code:`NodePath()` to point to its skeleton, " +"animation track use :code:`NodePath()` points to animated attribute in node." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:154 +msgid "Skeleton" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:155 +msgid "" +"Skeleton node inherits Spatial node, besides that it may have a list of " +"bones described in key, value pair in the format :code:`bones/Id/" +"Attribute=Value`, attributes of bone consisits of" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:159 +msgid "name" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:160 +msgid "parent" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:161 +msgid "rest" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:162 +msgid "pose" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:163 +#: ../../docs/development/file_formats/tscn.rst:384 +msgid "enabled" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:164 +msgid "bound_children" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:166 +msgid ":code:`name` must put as the first attribute of each bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:168 +msgid "" +":code:`parent` is the index of parent bone in the bone list, with parent " +"index, the bone list is built to a bone tree" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:171 +msgid ":code:`rest` is the transform matrix of bone in rest position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:173 +msgid ":code:`pose` is the pose matrix use :code:`rest` as basis" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:175 +msgid "" +":code:`bound_children` is a list of NodePath() points to BoneAttachments " +"belong to this bone" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:178 +msgid "An example of a skeleton node with two bones:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:198 +msgid "BoneAttachment" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:199 +msgid "" +"BoneAttachment node is an intermediate node to describe some node being " +"parented to a single bone in Skeleton node. The BoneAttachment has a :code:" +"`bone_name=NameOfBone`, and the corresponding bone being the parent has the " +"BoneAttachment node in its :code:`bound_children` list." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:204 +msgid "An example of one MeshInstance parented to a bone in Skeleton:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:228 +msgid "AnimationPlayer" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:229 +msgid "" +"AnimationPlayer works as an animation lib. it has animations listed in the " +"format :code:`anim/Name=SubResource(ResourceId)`, each refers to a Animation " +"internal resource. All the animation resources use the root node of " +"AnimationPlayer. The root node is stored as :code:`root_node=NodePath(Path/" +"To/Node)`." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:250 +msgid "" +"Resources are components that make up the nodes. For example, a MeshInstance " +"node will have an accompanying ArrayMesh resource. The ArrayMesh resource " +"may be either internal or external to the TSCN file." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:254 +msgid "" +"References to the resources are handled by id numbers in the resources " +"heading. External resources and internal resource are referred to with :code:" +"`ExtResource(id)` and :code:`SubResource(id)`. Because there have different " +"methods to refer to internal and external resource, you can have the same ID " +"for both an internal and external resource." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:260 +msgid "" +"For example, to refer to the resource :code:`[ext_resource id=3 type=" +"\"PackedScene\" path=....]` you would use :code:`ExtResource(3)`" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:266 +msgid "External Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:268 +msgid "" +"External resources are links to resources not contained within the TSCN file " +"itself. An external resource consists of:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:271 +msgid "A path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:272 +msgid "A type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:273 +msgid "An ID" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:275 +msgid "" +"Godot alway generates absolute paths relative to the resource directory and " +"thus prefixed with :code:`res://`, but paths relative to the TSCN file's " +"location are also valid." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:279 +msgid "Some example external resources are:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:288 +msgid "Internal Resources" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:290 +msgid "" +"A TSCN file can contain meshes, materials and other data, and these are " +"contained in the internal resources section of the file. The heading for an " +"internal resource looks similar to those of external resources, but does not " +"have a path. Internal resources also have :code:`key=value` pairs under each " +"heading. For example, a capsule collision shape looks like:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:303 +msgid "" +"Some internal resource contain links to other internal resources (such as a " +"mesh having a material). In this case, the referring resource must appear " +"before the reference to it. Thus, in the internal resources section of the " +"file, order does matter." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:308 +msgid "" +"Unfortunately, documentation on the formats for these subresources is not " +"complete, and while some can be found through inspecting resources of saved " +"files, others can only be found by looking through Godot's source." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:313 +msgid "ArrayMesh" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:314 +msgid "" +"ArrayMesh consists of several surfaces, each in the format :code:`surface" +"\\Index={}`, each surface is a set of vertex and a material." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:317 +msgid "TSCN support two format of surface," +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:319 +msgid "for the old format, each surface has three essential keys:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:321 +msgid "primitive" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:322 +msgid "arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:323 +msgid "morph_arrays" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:325 +msgid "" +":code:`primitive` is an enumerate variable, :code:`primitive=4` which is " +"PRIMITIVE_TRIANGLES is frequently used." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:328 +msgid ":code:`arrays` as name suggestes is an array of array, it contains:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:330 +msgid "a array of vertex position" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:331 +msgid "tagents array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:332 +msgid "vertex color array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:333 +msgid "UV array 1" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:334 +msgid "UV array 2" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:335 +msgid "bone index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:336 +msgid "bone weight array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:337 +msgid "vertex index array" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:339 +msgid "" +":code:`morph_arrays` is an array of morph, each morph is exactly an :code:" +"`arrays` without vertex index array." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:342 +msgid "An example of ArrayMesh:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:366 +msgid "" +"An animation resource consists of tracks. Besides, it has 'length', 'loop' " +"and 'step' applied to all the tracks." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:369 +msgid "length" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:370 +msgid "loop" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:371 +msgid "step" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:373 +msgid ":code:`length` and :code:`step` are both time in seconds" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:375 +msgid "" +"Each track is described by a list of key, value pairt in the format :code:" +"`tracks/Id/Attribute`, it includs:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:378 +msgid "type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:379 +msgid "path" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:380 +msgid "interp" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:381 +msgid "keys" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:382 +msgid "loop_wrap" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:383 +msgid "imported" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:387 +msgid "" +"The :code:`type` must be put as the first attribute of each track. The value " +"of :code:`type` can be:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:390 +msgid "'transform'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:391 +#, fuzzy +msgid "'value'" +msgstr "數值" + +#: ../../docs/development/file_formats/tscn.rst:392 +msgid "'method'" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:394 +msgid "" +"The :code:`path` has the format :code:`NodePath(Path/To/Node:Attribute)`. It " +"is the path from animation root node (property of AnimationPlayer) to the " +"animated node or attrbute." +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:398 +msgid "" +"The :code:`interp` is the method to interpolate frames from the keyframes. " +"it is a enum variable and can has value:" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:401 +msgid "0 (constant)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:402 +msgid "1 (linear)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:403 +msgid "2 (cubic)" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:405 +msgid "" +"The :code:`keys` is the keyframes, it appears as a PoolRealArray() but have " +"different structure for track with different type" +msgstr "" + +#: ../../docs/development/file_formats/tscn.rst:408 +msgid "" +"A transform track use every 12 real number in the :code:`keys` to describte " +"a keyframe. The first number is the timestamp, the second number is the " +"transision (default 1.0 in transform track), followed by a three number " +"translation vector, followed by four number rotation quaternion (x,y,z,w) " +"and finally a three number scale vector." msgstr "" #: ../../docs/community/contributing/index.rst:2 @@ -56097,6 +56903,10 @@ msgid "" "m48fn2jlBu_0DRh7PvAt-GULEmd>`_" msgstr "" +#: ../../docs/community/tutorials.rst:15 +msgid "`Steincodes `_" +msgstr "" + #: ../../docs/community/resources.rst:6 msgid "" "This is a list of third-party resources created by the community that may be "